← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #248684]: Do I need to do something special to support multiple monitors? FindFailed occurs when running with multiple monitors.

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
Sorry, but the feature you are looking for does not exist yet.

More than one monitor is supported, but you still have to specify on
which screen to search.

So in your case you have to do 2 searches

s0 = Screen(0);
s1 = Screen(1)

m = None
for s in (s0, s1): # or (s1, s0) to search on second monitor first
    m = s.exists(img)
    # if you want the first match to win
    # if m: break
if not m:
    print "not found on any monitor"
else:
    print "found here:", m

You might even delegate the 2 searches to threads, so they are done in
parallel (which might save you some millisecs ;-)

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