← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #680137]: repeat([waitTime]) how is this syntax with a region onchange?

 

Question #680137 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680137

    Status: Open => Answered

RaiMan proposed the following answer:
looks good. good progress.

The repeat() function is bound to the observe event and hence only
available in the handler.

so this should do what you want:

def changed(event):
        print "something changed in ", event.region
        for ch in event.getChanges():
                ch.highlight() # highlight all changes
        wait(1)
        for ch in event.getChanges():
                ch.highlight() # turn off the highlights
        event.repeat(4)

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.