User Tools

Site Tools


The Find Image on Screen action finds a specified image on the screen and stores the rectangle containing the match followed by the fuzz of the match (0-100), ie, (left,top,width,height,fuzz), in a variable.

The image location is stored in the variable may be referenced as a structure in other actions like Move and Click Mouse using the following notation:

  • ImageLoc.x — Horizontal position of upper left corner.
  • ImageLoc.y — Vertical position of upper left corner.
  • ImageLoc.width — the Width of the match (same as the source image).
  • ImageLoc.height — the Height of the match (same as the source image).
  • ImageLoc.fuzz — the Fuzz of the match.
  • ImageLoc.Midx — Horizontal position of center.
  • ImageLoc.Midy — Vertical position of center.

You can require the match to be unique (so if there are two or more good matches then the action will fail to find the image), or you can accept the best match even if there is more than one.

This action cannot fail per se, but it can fail to find the image, in which case the variable will be set to the empty string.

How To Use

Specifying Fields in Found Image Actions

  • Specify the image to match
  • Specify the amount of fuzziness allowed
    • Because of transparency and anti-aliasing almost all screen matches are fuzzy to some degree.
    • But usually about 20% is a good place to start.
  • Optionally highlight Found Matches
    • This can be helpful in determining the right amount of fuzz to use.
    • It can also show when an image is being found in more than one location.
  • Choose Where to Search for Image
    • All screens.
    • Main screen.
    • Specified screen (counting from the left).
    • Front window.
    • Window with a specified title.
    • Window with a title containing a given string.
    • Window with a title matching a given regular expression.
    • Specified window (counting from the frontmost window).
    • Specified area on the screen.

Search in Specified Area

Remember when specifying the area, as with all numeric fields, the numbers can be calculations including functions, and the fields expand to allow for longer expressions as soon as you type something other than a number, so this allows very precise control of where you can match.

Example: Click on Image in Area Relative to Front Window


See Also





action/Find_Image_on_Screen.txt · Last modified: 2017/09/11 06:54 by peternlewis