← Back to team overview

sikuli-driver team mailing list archive

[Question #670620]: Question about tolerance changing via script

 

New question #670620 on Sikuli:
https://answers.launchpad.net/sikuli/+question/670620

I'm trying to find an image using tolerance so that I can click it and know that it was clicked properly. My code right now is 

if exists("GaffeUnselected%d" %(game_number)):
    print("Button has not been pressed")
click("GaffeUnselected%d" %(game_number))
if exists("GaffeUnselected%d" %(game_number)):
    print("Button has not been pressed")
elif exists("GaffeSelected%d" %(game_number)):
    print("Button has been pressed")

I want the tolerance to be 96 or .96 for these images, but wherever I add that (either via .similar(.96) or exact(96) I get an error and it isn't running properly. I'm a beginner to Python, so any code examples for this would be much appreciated ^__^

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