← Back to team overview

sikuli-driver team mailing list archive

[Question #688883]: onAppear handler will be called again

 

New question #688883 on Sikuli:
https://answers.launchpad.net/sikuli/+question/688883

Now, I use 2.0.2 version
as the following code, I already stopObserver in handler1, but when open app2, it also have the image1, as the log, handler1 will be executed again. whether  stopObserver in handler1 just stop scan, it should clear image1 from onAppear?
if yes, is there any method?

def handler1(event):
     event.stopObserver()
     print "handler1 is ready"
     global process
     process = false
      
openApp("application path")
global process
process = True
onAppear("image1", hander1)
observe(FOREVER)

while True:
       wait(2)
      if process == False: break

def handler2(event):
     event.stopObserver()
     print "handler2is ready"

openApp("app2 path")
onAppear("image2", hander2)
observe(FOREVER)

thank you very much




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