Keyboard Maestro’s Click at Found Image action is very useful, and frankly, amazing to me. But only when it works. And in my hands it was rarely working (as for example in this recent post)
I did some reading on the forum (see below), but still couldn’t figure out why it was so rarely working for me. So I did some testing on my own and came to a surprising conclusion:
It depends on how you collect the screenshot image and place it into the “image well”
There are 2 ways I know of to collect screenshot images:
- Using ⇧⌘4 which generates a “Screenshot xxxx-xx-xx at xx.xx.xx” file
- Using ⇧^⌘4 which copies the image to the clipboard
With method (2) you paste the image into the “image well” of the Click at Found Image action. But with method (1) you drag the screenshot file into the image well instead.
Based on my testing (detailed below), using method (2) works but using method (1) does not. That is very good for those out there who actually read the Users Manual. But for those like me who think they already know everything about taking screenshots, well… you get the idea.
However, in my testing I found method (1) would work if I cut the image dimensions of the file in half (eg, using Preview > Adjust Size > enter 1/2 the value in the Width box, assuming “Scale proportionally” checked). Surprisingly, this suggests there is a difference in image scaling depending on whether one uses ⇧⌘4 or ⇧^⌘4
Details of my testing
The animated .gif below shows how I did my testing. It involves directing the mouse to click on the “Enabled Macros” folder in the “Groups” pane. I chose this for testing because clicking there will show its content in the “Macros” pane (hat tip to MacSparky).
In the first part of the video I use method (1) and it doesn’t work: nothing happens when the macro is run. After that I use method (2) and it works: when the macro is run the content of the “Enabled Macros” folder is shown.
I tried this test at the following resolutions on my 2020 M1 MacAir, but it made no difference:
1024x640
1280x800
1440x900
1680x1050
I also did tests using both .png and .jpg format screenshots, which can be changed as described here. Again, it made no difference.
In going though posts on this form I found that @Sleepy “spent days troubleshooting” a similar problem and suggested that it depended on what display resolution was being used. That’s why I tried all the resolutions listed above. In that same thread @Sleepy also describes what I call method (1), but in that case it worked.
Therefore, I doubt my findings can be generalized to all cases. I suspect it also depends on the size of the image being found. The testing I did was with a relatively small image. On the other hand, I don’t think it was so small as to be unrealistic.
I also did some testing with the fuzziness control, and other factors but could never come to a clear conclusion until I set up the controlled testing described here.
One final thing
It’s important to have Notifications enabled for Keyboard Maestro (System Settings > Notifications > Keyboard Maestro Engine > Allow Notifications). Because I initially had KM notifications turned off I had no clue why the Click at Found Image action would just “do nothing”. But when notifications are turned on a brief text window appears so that you at least know Keyboard Maestro tried but couldn’t find the image.