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

    Status: Open => Answered

masuo proposed the following answer:
Use "break"  when you want to exit from loop.

[example specification]
When  image1  is  found, click image3, then end.
While image1 is not found, repeat click image2 and sleep .

[example code]
for n in range(10):
    if  not exists("image1.png",0):
         click("image2.png")
         sleep(1)
    else:
        click("image3.png")
        break

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

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to