← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #661603]: Set tolerance in click(image)

 

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

    Status: Answered => Open

Max is still having a problem:
thanks for the tips!

I was able to do it using pattern as you suggested with the following
code:

my_image = find(Pattern("1513067174539.png").similar(0.5))
click(my_image)

Then I tried to insert exsist function since I don't know a priori if
the image is present and I don't want that if the find fails the program
stops, but the script crashed.

while true
    my_image = find(Pattern("1513067174539.png").similar(0.5))
    if exists(my_image):
        click(my_image)
    else:
        sleep(5)
        type("t", KeyModifier.CTRL)

How can I solve this problem? Is it possible to use a mach object
obtained by find() inside exsist()???

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