sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #49782
Re: [Question #676844]: if error or cant finde image run last instruction
Question #676844 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/676844
Status: Open => Answered
Jitendra patel proposed the following answer:
I think this is what you want if i understand correctly
this will click 6.png once if 7.png doesnt exsits it will click 6.png
again and if 7.png still doesnt exists then it will start over at 1.png
but if 7.png exists then it continues to 7 8 9..
def check7():
if exists(6.png):
click(getLastMatch())
if exists(7.png):
click(getLastMatch())
else:
return True
return False
while True: #exists(1.png):
click(1.png)
click(2.png)
click(3.png)
click(4.png)
click(5.png)
click(6.png)
reset = check7()
if reset:
continue
click(8.png)
click(9.png)
click(10.png)
click(11.png)
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.