← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #679532]: How to stop waiting in main script by observer handler

 

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

    Status: Answered => Open

partosXP is still having a problem:
Thanks for the answer,RaiMan!

I thought about this way, but it can't  *interrupt* current running of
the loop, only break the next one.

I checked this code one more time now - after revealing of error.png -
it still waiting for target 1.png for 300 sec more and break loop only
after this.

The main idea of the question - how interrupt main script, while its running, by background process and its handler.
(ofcourse, i can rework script to not use so long waitings, but its just an example. The same problem if we have many short steps and one error handler for all of them.)

Wrap all micro steps to construction like:
***
while True:
if shouldStop: 
break
ifexists("object"):
break
wait(1)
***
- seems to be so monstrous... i cant believe that its part of light side of power). is it?

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