← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #233079]: Python and Sikuli - Selecting from a list (multiple)

 

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

RaiMan posted a new comment:
If needed, this can be optimized according timing: 
- since you seem to search on the whole screen, each search in average takes 0.5 seconds
- in the standard Sikuli gives up after 3 seconds if an image does not appear

So if the 3rd image is the one appearing, your solution would take
3 (exists) + 3 (exists) + 0.5 (exists) + 0.5 (click) = 7 seconds

optimized:
for imageFile in imageFiles:
  if exists(imageFile, 0):
    click(getLastMatch())

0.5 + 0.5 +0.5 + 0 = 1.5 seconds

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.