sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #38650
Re: [Question #295594]: Relaunch script on error
Question #295594 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/295594
Status: Open => Answered
RaiMan proposed the following answer:
this solution simply starts the given script all over again, no matter, how it ended.
To stop it intentionally, you have to abort it.
There are different possibilities, to get feedback, about how the script
terminated. see the mentioned docs.
--- Also what about the maximum wait time in a while loop?
not understood what you mean.
a maximum wait time can be given with wait() and exists().
if exceeded, wait() throws a FindFailed, which can be handled with a try/except, whereas exists() returns None in this case, which usually is checked and handled with if/else.
in the except/else branches you can use break to leave a wrapping while loop.
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.