← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #662733]: stop a reg.observeInBackground(FOREVER) whitout event happening

 

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

Description changed to:
windows 10, windows 7
sikuli 1.1.1 build 2017-03-29_10:41

I have a script
###

def test(event):
    Settings.reg.mouseMove(event.match)
    mouseDown(Button.MIDDLE)
    mouseUp(Button.MIDDLE)
    event.stopObserver()
def test1(event):
    .... 

Settings.reg = Region(0,0,1279,1023)
Settings.reg.onAppear("1515499615589.png",test)
Settings.reg.onAppear("1515502700206.png",test)
Settings.reg.observeInBackground(FOREVER)

while True:
   MyMainCode....

###
I use forever because I do not know when the image will appear.
I have several small regions, and I observe them all at once.
On certain occasions, I need to stop the observation of all regions without the image appearing. I have to do this in mymaincode.
and then go back to observe, again in mymaincode
How can I do that?

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