Select Area for "Click Center of Image" - Create Action Macro (v10.0)

Select Area for "Click Center of Image" - Create Action Macro (v10.0)


Purpose:

  • Let user select the area to search the image and create a "Click Center of Image" action in the clipboard. → No need to manually enter the area coordination anymore!

Instructions:

  • Run the macro, select the area, and paste the action to wherever you want. That's it!
  • "Restore Mouse Location" is enabled by default.

A Clarification:

The macro does not create a screenshot image. Instead, it creates an area in which we ask KM to search for the image. The screen area dimension should usually be larger than the target image.

For the "Click at Center of Image" action, we need 2 things:

  1. the target image to search for, and
  2. the screen area in which to search the target image.

The macro example does step 2 for us (not step 1), which usually takes much more time to manually type in the four numbers (the X, Y, as well as Width and Height)

Therefore, we still need to take a screenshot image and paste it to the action. If you have the image saved to a file, you may search for a file instead of an image.

Select Area for "Click Center of Image" - Create Action.kmmacros (6.2 KB)

1 Like

Great idea!

When I run the macro, it does put the action on the clipboard, but the image in the action is empty (when I quick view it, says No Contents).

Hi @evanfuchs,

I'm glad to hear that you found it useful.

I guessed people might be expecting for a screenshot and was thinking whether to make a clarification or not.

The macro does not automatically provide a screenshot. It creates an area in which we ask KM to search for the image, and the area should usually be larger than the target image.

For this kind of action, we need 2 things:

  1. the image to search for, and
  2. the screen area to search the image in.

The macro example does step 2 for us (not step 1), which usually takes much more time to manually type in the four numbers (the X, Y, as well as Width and Height)

Therefore, we still need to take a screenshot image and paste it to the action. If you have the image saved to a file, you may search for a file instead of an image.

Hope it helps!

1 Like

Got it.

Works as described! Thanks again for sharing.

1 Like