Question #691302 on Sikuli changed:

RaiMan posted a new comment:
The solution masuo suggested in comment #3 is the best one.
It gives the chance to evaluate the matches with little effort.

To use findBest() only makes sense, if you have more than one image and
want to find the one with the highest score (e.g. a button, that might
have different states).

If you want to work without handling FindFailed, you have to use

So in your case, supposing the resulting matches do not matter:

if rightRegion.exists(Pattern("1592064085453.png").similar(0.98)) or 
    print "on screen"
    print "is not there"

if the matches matter:

match1 = rightRegion.findBest(Pattern("1592064085453.png").similar(0.98))
match2 = rightRegion.findBest(Pattern("1592064049381.png").similar(0.98))
if match1 and match2:
    print "on screen both"
elif match1:
    print "on screen match1"
elif match2:
    print "on screen match2"
    print "is not there"

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

Mailing list:
Post to     :
Unsubscribe :
More help   :

Reply via email to