← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #228978]: Similarity index in Java using the click method

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
No, the second argument of click(image, mod) is the KeyModifier code for the mod key to be pressed together with the mouse click(SHIFT, ALT, CTRL, CMD).
So click(image) and click(image, 0) do the same (no mod key pressed).

-- global min similarity
Settings.MinSimilarity = 0.x
the maximum value that should be used is 0.99 (1.0 has a bug)

Nevertheless, it is not recommended, to use a global value above 0.9, to
avoid too much FindFailed situations.

-- search with a special minSimilarity
use the Pattern class, to produce search objects with min similarity and a target offset attributes.
s.click(new Pattern(image_string).similar(0.99))

more details: http://doc.sikuli.org/javadoc/index.html

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