Image Detectiion not seeing the image, how to fix?

Hello, basically I've been making an auto clicker that will stop when a certain image has been detected, I've tried to fix it in many ways, such as limiting the area it needs to check. However, this has not worked, any suggestions?

Difficult to say without seeing your macro -- you'll find instructions on how to post macros at How to Post/Upload your Macros and Scripts .

One thing to check is how you captured the image to be checked in the first place -- there can be issues with screen captures that have been saved to file. The best way to capture an image for use in a KM action is to use ⌃⇧⌘4 and drag out the area, which puts the screen capture onto the System Clipboard. You can then paste into the KM action's image well.

1 Like


This is a screenshot, the intended purpose was to stop the autoclicker once it sees the desired image, however the issue is that even if said image was on screen KM said "currently false"

That is not what it does, even if the image detect works flawlessly.

What it will do is look once at the screen -- your "If" condition -- and if the image isn't there at that precise moment it will click 9999x9999x9999x9999 times. It won't stop if/when your image appears!

What you actually want is more like:

I.E. "While this image is not on the screen, do the clicky thing".

2 Likes

Oh ok, but I still have one issue, KM says that the image was not on the screen (said false) even when it was on the screen, why's that?

Assuming you actually have an image in the image well (you don't have one in your screen shot), seeing an image isn't enough for me to debug your current problem. In order to debug this for you we need to know precisely what steps you took to place the image in the well. Or, if you don't tell us, we could tell you a valid way to create the images and you could follow our instructions. Which way do you prefer?

My preferred method is to press CTRL-SHIFT-4 and then select the image from the screen and then paste or drag it into the image well. Is that what you did? Either do it this way or tell us precisely what you did to place your image into that image well.

2 Likes

Most of the time, I'd screenshot what I'd want it to detect, sometimes I'd remove the background to make it more neutral. And to put it into the image well I'd drag it in from finder.

Hello Allen (@code1):wave:

Don’t do this … ever…

KM won’t find your Image. Use macOS‘s Screenshot feature to capture the desired thing and use the ecxact Image as is. Alternatively to not bloat the Macro XML Plist use KM Actions to write the caption to a file and insert it’s location into the Found Image Action.

Repeat this process for every possible change that could happen to your caption… as there’s a display change or change to the brightness of your display or light vs dark mode as well as used resolutions you are working on.

The more you invest doing these things the better KM is able to find your Images.

Greetings from Germany :de:

Tobias

That's your problem. Don't do that. Instead, try doing it the way I recommended.

Ok thank you so much! I will try that and see if that works