← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #267709]: not working properly similar

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
ok, found the reason for this behavior:

the "LastSeen" information is stored with the used image.

Since the first time, "shop_slide-2.png" was found is in the else branch with
 shop_slide_match = exists("shop_slide-2.png", 5)

where you do not use the Pattern, so finding with 0.71 is allowed.

this information is stored with the image and it seems, that when using the same image in the
shop_slide_match = exists(shop_slide, 3)

it is evaluated as being still there, but the wanted minimum score of
0.9 is apparently ignored here.

I will check and fix that.

as a workaround for now do this:

     # check if its already opened
        shop_slide = Pattern("shop_slide-2.png").similar(0.90)
        Settings.CheckLastSeen = False
        shop_slide_match = exists(shop_slide, 3)
        Settings.CheckLastSeen = True
        if shop_slide_match:
….

No need to switch it off generally, since in the other cases it works
like it should (search about 10 times faster)

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