Is It Possible to Limit the Search Area for "Click at Found Image" to Coordinates in the Frontmost Window?

Is it possible to limit the search area for "click at found Image" to coordinates in the Fronmost Window?
Any help appreciated

Yep. Look at all the options.

action:Move or Click Mouse [Keyboard Maestro Wiki]


This from the KM wiki page about Found Image:

Choose Where to Search for Image

  • You can search in all screens, or on a specific screen.

  • Alternatively, you can search within a specific window.

    • However, the window must be in the frontmost, active, application, in order for it to be seen by this Action.
  • Or you can search within a specific area on the screen.

Wiki page here: Found Image [Keyboard Maestro Wiki]


Yes. You can set the coordinates offset from the top-left corner of the Front Window. In the example Macro below, the Highlight Rectangle Action is only there to help get the coordinates correct. Once the coordinates are determined they can be copied into the second Move and Click at Found Image Action and that first Action can be disabled or deleted.

EXAMPLE Search for Image in Front Window Area.kmmacros (13.6 KB)

Click to Show Image of Macro

This is what it looks like (with the first Highlight Rectangle Action running as well). Keyboard Maestro is searching for the image only within the confines of that blue rectangle of the Front Window.
EXAMPLE Search for Image in Front Window Area

EDIT - if you wanted to take the coordinates from the top-right corner of the Frontmost Window (instead of the top-left corner) that can be done as well by adjusting the math in the first box. For example, to get 150 pixels in from the top-right corner:

WINDOW(0,Left) + WINDOW(0,Width) - 150


Thanks, I was missing the "in area" part of the "click at found image" Action.

1 Like