← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #662358]: Finding in a region inside a captured image

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
Ok, understood.

Congratulations for the way you found !!!

... but can it be, that you did not set the timeout with the exists to 0 ?
If not: in case of not found, it tries for 3 seconds before giving up.

This would have been my solution

for line in range(lines): # number of grid rows
    for cols in range cols: # number of cols
        # calculate the grid region on screen for this gridelement
        for image in gridimages: # gridimages contains the images to check
            if gridRegion.exists(image, 0):
                # do what needed
                break

with version 1.1.2 there are findBest and findAny, that might help in your case:
http://sikulix-2014.readthedocs.io/en/latest/region.html#find-more-than-one-image-in-a-region-at-the-same-time

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.