Question about tolerance changing via script

Asked by Don S on 2018-07-02

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 ^__^

Question information

English Edit question
Sikuli Edit question
No assignee Edit question
Last query:
Last reply:
masuo (masuo-ohara) said : #1

Use SikuliX IDE and click image in editer pane, pattern setting window open.
Then select matching preview tab and move slider to change minimum similarity.
Switch off [Show ThumbNails], pattern setting will be shown.

like this:

Can you help with this problem?

Provide an answer of your own, or ask Don S for more information if necessary.

To post a message you must log in.