← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #691302]: [HowTo] handling findFailed

 

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

    Status: Open => Answered

masuo proposed the following answer:
Try similar() and exact().
https://sikulix-2014.readthedocs.io/en/latest/pattern.html?highlight=similar#Pattern.similar

[sample code]
r = Region(0,0,500,500)
anylist = r.findAny(Pattern("1592122231908.png").exact(),Pattern("1592122242862.png").exact())
if len(anylist):
    print "found"
    for m in anylist:
        if m.getIndex() == 0:
            m.highlight(1,"yellow")
        else:            
            m.highlight(1,"blue")
else:
    print "not found"

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