Question #677380 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/677380
Marc Summers gave more information on the question:
This is what I tried, but the problem is that
it acts like the first list from findAll is still
there, meaning that the findAll outside the loop
the first one that runs, sets up a list, but the
second findAll inside the for loop, does not appear
to overwrite the first one, so when I try to click the
more button, it is clicking in the wrong place.
I also tried tbuttsorted = 0 trying to clear the
sorted list, but that did not work either.
tbutt = 0
tbuttons = list(findAll("morebutton.png"))
print "I Found ",len(tbuttons)," matches"
tbuttsorted = sorted(tbuttons,key=lambda m:m.y)
for tbutt in tbuttsorted:
print "Going to click this more button"
hover(tbutt)
mouseDown(Button.LEFT)
mouseUp(Button.LEFT)
sleep(1)
try:
find(Pattern("ordercodedmg290.png").similar(0.99))
print "Found Order Code DMG290"
print "I am going with this one ", tbutt
mouseDown(Button.RIGHT)
mouseUp(Button.RIGHT)
mouseDown(Button.LEFT)
mouseUp(Button.LEFT)
break
except FindFailed:
print "Did NOT Find Order Code DMG290"
print "Going to try the next more button"
mouseDown(Button.RIGHT)
mouseUp(Button.RIGHT)
mouseDown(Button.LEFT)
mouseUp(Button.LEFT)
sleep(5)
tbuttons = list(findAll("morebutton.png"))
print "I Found ",len(tbuttons)," matches"
tbuttsorted = sorted(tbuttons,key=lambda m:m.y)
sleep(5)
hover(tbutt)
--
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