← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #655511]: Waiting to do 1 of 2 actions

 

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

Manfred Hampl proposed the following answer:
In addition to my previous comment:
You are right, the program will loop in the first while block:

A break statement will only escape the innermost loop. So the "break" in line 12 will not cause the first big loop (lines 2 - 12) to end.
As already written before, there is no need for a while statement in line 11. If you replace lines 11-12 with a simple "break" with a first level-indent (indented the same amount as line 8), then the "break" will cause an escape from the first loop (and lead to a never-ending loop in lines 13-15 as long as that part is not corrected).

By the way, I do not really understand why lines 2-12 are packed into a
"while true" loop.

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