Skip to main content

Find image on screen

Look for a picture on the screen, optionally in a region and for its n-th appearance; returns the point of the match.

Command in the Image recognition toolkit · id ooa.image/find_on_screen · 13 inputs (1 required), 5 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
TemplateFileYesPicture to look for.
ToleranceNumberNo10Allowed difference in percent (0 = pixel-exact); raise for anti-aliased or scaled screens.
OccurrenceNumberNo1Which match to use when the picture appears several times, counting in reading order from 1.
PositionStringNocenterPoint reported (and clicked): center of the match, or its top_left corner; offsets are added to it.
Offset xNumberNo0Pixels added to the reported x, e.g. to reach a field to the right of a label picture.
Offset yNumberNo0Pixels added to the reported y.
XNumberNoSearch region left; the whole image or screen when the region is empty.
YNumberNoSearch region top.
WidthNumberNoSearch region width.
HeightNumberNoSearch region height.
Timeout (seconds)NumberNo0Keep looking for up to this many seconds while the picture is not there; 0 looks once. found is false when time runs out.
Interval (milliseconds)NumberNo500Pause between two looks at the screen while waiting, in milliseconds.
WindowStringNoLook only inside this window (text in its title, * and ?, or re:); x and y then count from its top-left corner (G4).

Outputs​

OutputTypeWhat it is
foundBooleanTrue when found.
xNumberCentre x on screen (or the chosen point).
yNumberCentre y on screen (or the chosen point).
similarityNumberSimilarity in percent.
countNumberNumber of matches found (up to occurrence when it is above 1).