← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #691629]: Using repeat in event handle with wait time

 

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

    Status: Open => Answered

masuo proposed the following answer:
I am interested in your question, so I tested in my environment. 
"repeat" work fine in my environment.
Did you use "observeInBackground" ?

[my environment:]
Windows10, SikuliX2.0.4

[my sample code:]
def change(event):
    event.getRegion().highlight(1)
    event.repeat(5)

r = Region(0,0,100,800)
r.onAppear("1593845349130.png",change)
r.observeInBackground()

for cnt in range(30):
    if r.exists("1593844143835.png",0):
        r.stopObserver()
    else:
        Do.popup("cnt:%d" % cnt, "title", 1)

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