glitchassassin / lackey

Lackey - Graphical desktop automation with Python
MIT License
616 stars 75 forks source link

Adjust the minimum of similarity #155

Closed frank1121 closed 4 years ago

frank1121 commented 4 years ago

Hi,the minimum of similarity is 0.7,how can I adjust the similarity to 0.8?

glitchassassin commented 4 years ago

You should be able to set the similarity to anything you want by adjusting the Pattern:

lackey.find(lackey.Pattern("to_find.png").similar(0.8))

For more on this, see the docs for Lackey:

https://lackey.readthedocs.io/en/latest/lackey.html#lackey.Pattern.similar

Or the docs for Sikuli, upon which Lackey is based:

https://sikulix-2014.readthedocs.io/en/latest/pattern.html#pattern

frank1121 commented 4 years ago

You should be able to set the similarity to anything you want by adjusting the Pattern:

lackey.find(lackey.Pattern("to_find.png").similar(0.8))

For more on this, see the docs for Lackey:

https://lackey.readthedocs.io/en/latest/lackey.html#lackey.Pattern.similar

Or the docs for Sikuli, upon which Lackey is based:

https://sikulix-2014.readthedocs.io/en/latest/pattern.html#pattern

thanks a lot