Can't Find Images

I can't find the attached images in Chrome or Firefox.
If I open it in Preview it is found, but if I make the image a bit smaller to match the size that the text is in Chrome, it is not found.

I have also tried other text within Chrome that is larger and is dark blue on white.
It is still not found.

I have tried in 'Screen' and also in 'Front Window' to no avail.

Screenshot 2023-11-02 at 8.35.02 PM
Screenshot 2023-11-02 at 8.25.07 PM

To click relative to an image, you use the Mouse Click action, configure it to be relative to a found image, and take a screenshot of the desired area of the screen using Command-Control-Shift-4, and paste it into the image well on the action. The image has to be unique (which includes not being visible in the action if the image is small enough not to be shrunk in the image well) otherwise Keyboard Maestro will not know where to click. The Display option in the action will allow you to see where Keyboard Maestro is matching.

Note that you cannot “make the image a bit smaller” and expect it to work. The image size must exactly match the target size.

Also note that there appears to be some cases where a screen capture as described will capture a retina image but will use a DPI of 72,72 instead of 144,144 in which case the image will appear to Keyboard Maestro to be twice to large and thus not match.

Also note that matching text alone is often a challenge because the entire screen is covered in text and from an image matching perspective it all looks roughly like a similar blob of grey.

1 Like

I have a general question in this regard. How can one make the matching possible for multiple screen sizes? I currently use the fuzzines slider, which works, but sometimes misses. If you make it too fuzzy, then it will detect a lot of things and best match doesn’t always help.

I ask as this is something I encounter more often due to switching desks at work and having different screen resolutions and screens in general. Some key macros stop working then unfortunately.
Worst case I had was during a demo, which turned into a more in depth demo and example :sweat_smile:

P.S.: thanks for the new button scan as well. This replaces a couple of my image searches and resolves some of the problem :smiley:

One of the best KM macros I've ever written is one that moves the mouse to (or clicks on) the location of a "word" on the screen, and the location is determined using OCR, even though OCR does not return that information. I have found a way to do it. However it's a little slow, (mostly because the OCR in KM v10 was slow as it required saving images to a file first) and now that KM supports Apple's new OCR code, my algorithm should be much faster, so I'm planning to update it soon. I'm expecting it to work in "seconds" using Apple's OCR code. I'm not sure if "seconds" is fast enough for you. If you need "milliseconds" then Find Image is still your best choice.

Of course, my algorithm requires that the word be unique on the screen. In your case the macro would work like this:

ClickOnWord("Title")
ClickOnWord("Household Staffing")

If the page allows you to click on the word itself, rather than just the tiny arrow to the right, then this may work for you.

Using my method you can avoid all the complexities of using "Find Image", at least for the times that you are looking for "words". My method also has the interesting feature that it "remembers" where the word were last seen, using a KM dictionary, and doesn't bother to search for them if the words are in the same place that they were the last time.

One of the purposes I use this macro for looks like this:

ClickOnWord("Click to Continue")

You cannot. You need to use an appropriate size image for the screen resolution.

If you need to deal with multiple resolution screens then you will need to have multiple actions with the appropriate action selected based on the screen size.

That's the main reason I created my ClickOnWord("x") macro. It's independent of resolution and DPI. And it also saves a ton of memory & time, as the KM Editor doesn't have to save bitmaps.

I used the if statement with 'pixel' match.
Very nice, I hadn't used it much before.
Very powerful, I'll be using that a bit for sure.

Thank you for incredible software!

1 Like

It’s a pretty cool idea, but that unfortunately doesn’t work with some of my images as they are not all text.
Some things don't have text, but I can now use the new button function and other things I'll have to create a if else case.

That’s unfortunate, but figured Ill have to use if else case then.
Maybe even go a step further and check with the Accessibility Inspector you've mentioned in another post to get rid of even more found image blocks ^^