← Back to team overview

sikuli-driver team mailing list archive

[Question #302266]: sikuli code repeating

 

New question #302266 on Sikuli:
https://answers.launchpad.net/sikuli/+question/302266

How can i have this code run up-to 10X when it finds what it is looking for it clicks and then terminates. I only want "the else" to click one time, but "if not exists" to continue up-to 10 times, before terminating.


for n in range(10):
#while (exists("1469038914742.png"),1):
#while True:
        if not exists("1469039051065.png"):
            click("1469038914742.png")
        else:
            click("1469042062223.png")
            click("1469038914742.png")



Thanks in advance

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