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
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Template | File | Yes | Picture to look for. | |
| Tolerance | Number | No | 10 | Allowed difference in percent (0 = pixel-exact); raise for anti-aliased or scaled screens. |
| Occurrence | Number | No | 1 | Which match to use when the picture appears several times, counting in reading order from 1. |
| Position | String | No | center | Point reported (and clicked): center of the match, or its top_left corner; offsets are added to it. |
| Offset x | Number | No | 0 | Pixels added to the reported x, e.g. to reach a field to the right of a label picture. |
| Offset y | Number | No | 0 | Pixels added to the reported y. |
| X | Number | No | Search region left; the whole image or screen when the region is empty. | |
| Y | Number | No | Search region top. | |
| Width | Number | No | Search region width. | |
| Height | Number | No | Search region height. | |
| Timeout (seconds) | Number | No | 0 | Keep 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) | Number | No | 500 | Pause between two looks at the screen while waiting, in milliseconds. |
| Window | String | No | Look only inside this window (text in its title, * and ?, or re:); x and y then count from its top-left corner (G4). |
Outputs
| Output | Type | What it is |
|---|---|---|
| found | Boolean | True when found. |
| x | Number | Centre x on screen (or the chosen point). |
| y | Number | Centre y on screen (or the chosen point). |
| similarity | Number | Similarity in percent. |
| count | Number | Number of matches found (up to occurrence when it is above 1). |