sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #19734
[Question #233903]: image not reconized in while loop
New question #233903 on Sikuli:
https://answers.launchpad.net/sikuli/+question/233903
b1=Pattern(Pattern("LeftforeLeft.png").targetOffset(-90,-144)).targetOffset(-90,-144)
b2=Pattern(Pattern("LeftforeLeft-1.png").targetOffset(-90,-113)).targetOffset(-90,-111)
b3=Pattern(Pattern("LeftforeLeft-2.png").targetOffset(-90,-80)).targetOffset(-90,-80)
b4=Pattern(Pattern("LeftforeLeft-3.png").targetOffset(-90,-51)).targetOffset(-90,-51)
b5=Pattern(Pattern("LeftforeLeft-4.png").targetOffset(-90,-17)).targetOffset(-90,-17)
b6=Pattern(Pattern("Leftforeleft-5.png").targetOffset(-90,16)).targetOffset(-90,16)
b7=Pattern(Pattern("Leftforeleft-6.png").targetOffset(-91,49)).targetOffset(-91,49)
b8=Pattern(Pattern("Leftforeleft-7.png").targetOffset(-90,82)).targetOffset(-90,82)
b9=Pattern(Pattern("leftforeleft-10.png").targetOffset(-90,114)).targetOffset(-90,114)
b10=Pattern(Pattern("Leftforeleft-9.png").targetOffset(-92,147)).targetOffset(-92,147)
n=1
while n>0:
print n
wait(4)
find(eval("b"+str(n)))
click(eval("b"+str(n)))
wait(1)
click("Copture.png")
wait(5)
if exists("Ok-4.png"):
find("Ok-4.png")
click("Ok-4.png")
wait(2)
else:
print "Success"
wait(10)
n=n+1
if n==11:
break
while i am trying to run the above script, getting find failed error. while running the loop up to 1 to 7 or 6 to 10(breaking the loop refer last line) its finds the particular offset in the screen and executed the loop successfully. but while running the entire script say ( loop 1 to 10) sikuli not able to click on the targetoffset and loop fails at 7 and after that its clicking randomly. is there any way to sort out tis issue.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.