sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #12454
Re: [Question #205371]: One image, multiple sizes?
Question #205371 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/205371
RaiMan posted a new comment:
Thanks for kind feedback.
--- I'll probably get as many sizes as possible via ImageMagick and ask Sikuli to alert on first match.
This is a bit tricky with Sikuli and needs some extra scripting/programming, since there currently is no Sikuli feature to search a set of images in one run.
a basic approach:
images = (image1, image2, image3, ... , imageN) # the image filenames
found = -1
for i in range( len(images) ):
if exists( images[i], 0): found = i; break
if found < 0:
print "no image found"
else:
print "found image %d ( %s )"%(found, images[found])
this makes one search for every given image without waiting the standard 3 seconds if not present and stops with the first one found.
Since searching the whole screen (as in this case) might last up to 1 sec per search trial, it usually is a must to restrict the search region to a smaller area. search times can thus be reduced to 1/10.
more speed is possible if you delegate the searches to threads if
needed.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.