@Greg I still have to revise the docs. for you: onAppear/onVanish detection is stopped after the first event in one observe run. If you want to continue the observation, you have to say repeat() in the handler.
There are 2 options: repeat() # immediately after return from handler continue detection of this event or repeat(time) # after return from handler pause for time seconds and then continue detection ** Description changed: - --- fixed with 1.0.1 + --- fixed with 1.1.0 - --- no easy workaround for background observe + see the docs: + http://sikulix-2014.readthedocs.org/en/latest/region.html#observing-visual-events-in-a-region - For those who know Python: start a thread with a repeated foreground - observe - - Will be fixed with the service update end July already. - - ------------------------------------- + for how to repeat onAppear()/onVanish() in the same observe run + --------------------------------------------------------------- my purpose is to deal w/ 1 button which will appear several times in a game(actually it is the angrybird game) ,then i used the onappear()/observe() but ir can just deal w/ the 1 time the button shows ,following shows can not be deal ,below is my test code , what i think is that it can deal each time when button shows until the script end. below is my test code : def myHandler(event): click("1373853815762.png") wait(5) Settings.ObserveScanRate=1 onAppear(("1373853815762.png"),myHandler) observe(FOREVER,background = True) for i in range(1,5000): print "testing....." wait(5) ** Summary changed: - [1.0.1 ok] OnAppear()/observe() only works the first time for one image in same region + [1.0.1] OnAppear()/observe() only works the first time for one image in same region -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1201280 Title: [1.0.1] OnAppear()/observe() only works the first time for one image in same region Status in Sikuli: Fix Committed Bug description: --- fixed with 1.1.0 see the docs: http://sikulix-2014.readthedocs.org/en/latest/region.html#observing-visual-events-in-a-region for how to repeat onAppear()/onVanish() in the same observe run --------------------------------------------------------------- my purpose is to deal w/ 1 button which will appear several times in a game(actually it is the angrybird game) ,then i used the onappear()/observe() but ir can just deal w/ the 1 time the button shows ,following shows can not be deal ,below is my test code , what i think is that it can deal each time when button shows until the script end. below is my test code : def myHandler(event): click("1373853815762.png") wait(5) Settings.ObserveScanRate=1 onAppear(("1373853815762.png"),myHandler) observe(FOREVER,background = True) for i in range(1,5000): print "testing....." wait(5) To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1201280/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~sikuli-driver Post to : [email protected] Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp

