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

    Status: Open => Answered

RaiMan proposed the following answer:
if you want to reliably use observe, I recommend to use version 1.1.0
(http://sikulix.com).

I do not support problems in 1.0.1 with observe anymore.

in 1.1.0:

- onAppear, onVanish in 1.1.0
... stop observing after the first success
... need an event.repeat(waittime) before leaving the handler, if you want to 
continue the observe
... to stop the observe in handler: event.stopObserver()

Never ever start an observer inside of a handler !!!

def my_handler(event):
    print "My handler", event.match
    event.repeat(2)

dz.scr.onAppear(Interface.Loading['play_w7'], my_handler)
dz.scr.observe(60, True)

for i in range(30):
    print('----------------------' + str(i))
    sleep(0.5)

The docs for the new observe in 1.1.0 will be available tomorrow.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to