Having issues with Click on Found Image action

I am a heavy user of the "Click on Found Image" action (COFI) and have run into an issue. A software program that I use recently had an update where some of the icons changed which I knew meant that I would have to re-do some screen captures and update my automation macros that use the COFI feature.

Unfortunately, I cannot get COFI to recognize any NEW screen capture images that I drop in the well. OLD COFI actions that are unchanged continue to work fine.

I use COFI a lot so I am well-versed in using the action's settings. I usually use the command+ shift +4 built in screenshot tool to get my images but I also tried using Keyboard Maestro's screenshot action to see if that would make a difference.

Any troubleshooting help would be appreciated.

I am on macOS Sonoma 14.5, KM 11.0.3, and using an M3 MBPro.

Thanks in advance!

Try using command+control+shift-4 to capture to the clipboard, then paste directly into the action's image well.

There are three more things that might be causing your problem.

  1. You are using the "Unique" menu item instead of the "Best" menu item.
  2. Your image is very small and you have the KM Editor open while you run your macro, which can cause the KM Engine to find the copy in your editor instead of on your screen.
  3. You aren't pasting or dragging the image directly into the image well, but you are saving the image to a file first or moving it into the Preview app. These can introduce problem with DPI. If you follow Nige's advice above, that should prevent this issue.

Also, at least for debugging this, it's best to turn on the "Display" flag so you can see green boxes over the images that met your match.

These are my best ideas. There's no guarantee that any of these ideas will fix your problem, but they usually fix me when I have similar issues.

Another way to debug is to avoid using the Click on Find Image action, and just use Find Image instead. Then display the contents of the variable that the latter action gives you as the result. This could help eliminate that it's the mouse. You see, some apps fail to recognize the "Click" part of "Click and Find Image" if the timing of the click is too quick after the last mouse click. Sometimes KM is just too fast for our own good.

Thanks for your feedback! I also use the "Best" menu item and am aware of your point #2. I suspect it is an issue with the DPI (your point #3) since the COFI action has been working otherwise. Any ideas why saving it as a file first would cause an issue now since it has never caused an issue for me before in the 10 years I've been using KM??

That worked! Thank you!

I can't tell you exactly why it has changed in your case, because I know nothing about which apps you use to capture or process or save your images. But I can still explain the general reason.

As you know, images have an X/Y pixel count. But many people don't know they also have a DPI "attribute." Some apps change the DPI attribute, usually to no ill effect. In the case of macOS, some apps double the DPI count. For certain purposes, like pasting images into documents, the DPI count is irrelevant, but for the Find Image action, the DPI count is very relevant. Basically, due to "Retina Resolution", if you paste the correct image with the wrong DPI attribute into the Find Image action, that action is looking for an image that is literally twice the "size" of the original image. That's the reason it cannot "find" your images anymore, because it's looking for a copy of the image that's 2x higher and 2x wider than your original image. (Or some other value, depending upon what you have picked in this part of System Settings:)

You can change (i.e, fix) the DPI count for an image stored in the clipboard in KM by using this action...


Using this action properly can "fix" the DPI count of the image. But I don't bother with it since I've learned to correctly capture images without putting them through apps that change the DPI attribute. I don't want to have to "fix" the DPI count of an image in my macros, so I just capture the images and use them without processing them in any apps, including Preview.

There was a thread about this a couple of months ago, but the tl;dr was that we never got to the bottom of it -- even on the same OSs and hardware and all using Preview, some people had this problem when saving to file and others didn't.

So the simple fix is use the clipboard, and if you must use a file use either @Airy's fix above or do similar with Preview's Tools->Adjust Size...