Image on the screen condition - stopped working since upgrade to Sonoma

Since upgrade to Sonoma, the Image on the screen condition stopped working correctly. I had to increase the fuzziness significantly for KBM to recognize the image, but now it does not distinguish between the blue and grey backgrounds of the image. (The goal is to return true with the blue, but not grey image). It worked perfectly fine on previous MacOS.
Is it a KBM bug? Sonoma bug? How to fix it.

Screenshot 2023-10-05 at 10.08.13 AM
Screenshot 2023-10-05 at 10.08.24 AM

Changed from file: to image: (added SOAP in blue). No changes in malfunction:

KBM Appears to recognize this parts of screen:

But not this type of the screen:

SOAP

@peternlewis what do you think is going on? It appears that KBM's ability to discern a correct image has changed after update to Sonoma.

Here is the macro to pause until image found and move the mouse over S circle next to sudelb on this page - it does not recognize the image:

Image on the screen trial - Sonoma.kmmacros (30.8 KB)

I just had a quick check and had no issues with Sonoma.

Looking at the matches you show, they look very tall - are they twice as tall as the SOAP image you are trying to match. Because that is what it looks like which would indicate a Retina issue. How are you copying the image to search for? I used the built in screen capture, copied the section, pasted it in to the image and it matched fine.

I used the built in screen capture too.

Did you try my last posted example with S circle? It doesn’t work either. I’m at loss as what happened and how I can fix it.

The only change was an update to Sonoma as far as I can tell.

Yes, if I create the same action, the images are the same size in pixels, but the image DPI for your image is 72dpi, for mine is 144dpi.

I'm afraid I don't know why the DPI for your image is 72.

You can forcibly adjust the DPI of the image on the clipboard using the Set Image DPI action.

You are absolutely correct, thank you, Peter!
Not sure why DPI for the screenshot action changed with upgrade to Sonoma. It was reported among the Apple developer's community as a bug. However I did not find how to change it. It appears that write com.apple.screencapture does not have a DPI setting to change. Using external app helped. Hope Apple will fix it.

1 Like

My trials were in Sonoma, so it appears not everywhere is it broken.

After many attempts to fix it, decided to do a clean install and go back to Ventura…

I was going to post this as a separate topic, and it may not be related to this, so YMMV.

I just noticed this recently...when the "Display" checkbox is checked, KM seems to be better at detecting images. I'm also not sure if this was the case in Ventura (I'm currently on Sonoma).

I was able to reproduce this at will with one of my macros...turning the Display checkbox on was roughly the equivalent of making the fuzziness fuzzier a full "notch", if that makes sense.

I doubt this - the Display checkbox simply shows what is found, so by the point that it gets involved the finding has already been completed.

I couldn't believe my finding either. But I tested it a few times...when the checkbox was unchecked, KM couldn't find the image, And when I checked the checkbox, KM found it immediately.

When I have some time, I'll do more testing. If I can re-confirm it, I'll create a new post and maybe take a video. As it stands, I wouldn't spend any time on it.

1 Like