Problem with click on found image - works in KM but not in macro

Hi there,

i've been using the find image action quite a lot in the pasts months sucessfully in many different scenarios and think i know my way around the quirks and limitations that can happen sometimes with it. So i have a macro where im selecting files in a file browser popup and am having trouble getting this particular one to work. I'm trying to click on a folder in column view inside the file browser. I've used this technique before and am stumped as to why it won't work here.

When i run the macro it will fail with a 'no unique image found' error. But when i switch to KM and click on the GO button it finds it without problem. SO i run the macro, get the 'no unique image found, switch to KM, click the GO button and the cursor moves to where it should. I have set the fuzz and put it on 'best' instead of unique as usual. Also tried different fuzz settings (although there is nothing on the screen even resembling the image i'm trying to find), tried all the settings combinations in the action options, using main screen or front window options and set a large pause before the action so the file browser has time to load/display all the files in the folder .... but none of the usual twiddles to get this to work help.

what am i missing? here are the settings:

Screenshot 2021-01-28 at 13.23.39

i have a workaround now (using a blue tag on the folder i want to open instead of the foder icon and name) so no worries but still stumped as to why this doesn't work as expected.

do you have two or more Finder windows opened?

no that was one of the things i tested so i closed all windows and apps other than the ones i'm using for this (Chrome and KM) on an empty desktop.

so i'm starting to have this issue with more and more images. It's always the same, macro stops with 'Move or click image no unique image found ...' i click on the GO button in KM on the action that failed and the cursor moves to where it should be without problems.

There are obvious differences once you switch to Keyboard Maestro, presumably it is covering part of the screen. Is it covering the alternatives? What does the Display option show - is it finding more than one matching image?

hi @peternlewis thx for answering

no i have an ultrawide screen and only 3 windows open covering all the screen real estate: word, Chrome and KM (each one about a third of the screen width). So nothing changes on screen when i switch to KM. The desktop is entirely covered and nothing is showing through.

The green display only shows the percentage, i see no other green highlights except the one image i'm searching for.

Well, you can turn on debugging and look through the Engine.log file (Help ➤ Open Logs Folder) to try to decipher what it is doing when it fails to find the image.

In the Terminal, run the command:

defaults write com.stairways.keyboardmaestro.engine Debug MatchImage

and then restart the Keyboard Maestro Engine.

Or you can also have it save the two images (the source and target images) with:

defaults write com.stairways.keyboardmaestro.engine Debug SaveFindImage

or both

defaults write com.stairways.keyboardmaestro.engine Debug "MatchImage SaveFindImage"

(images are saved in /tmp/source.tiff and /tmp/target.tiff)

Remove the debugging later with:

defaults delete com.stairways.keyboardmaestro.engine Debug

That might indicate where the problem is.