Sometimes it just won't find the chosen image - even though it has already found the exact same image 20 times in a row!
Even when the fuzziness is turned up to 100%!
And then I pick up the window that contains the image to be found, move it by a few pixels and then it finds the image, highlighting it as 1% precise.
And then a few more iterations later it does it again.
This keeps breaking my macros over and over and over again and it's a total roadblock.
This happens no matter how big or small the selected image is. And as mentioned, the image is right there.
Anyone?
There's a chance you are doing something wrong, because most of us can use it with no problem.
It would help if you showed/uploaded your macro.
Without seeing your macro, there are a couple of things I can suggest that you try: (1) reboot your KM Engine; (2) change your Find Image action to "Best" instead of "Unique." (3) Turn on the Display flag in the Find Image action so that you can see what's happening better. (4) Remove any "area" fields and search the whole screen instead.
I could probably give better advice if I could see your macro.
The only time Find Image doesn't work for me is when I'm searching for a 100% solid white square. I was trying to locate all the squares on a chess board on the screen, but apparently a solid white square is unreliable. You must have some detail in the image. If I could see your macro I could possibly spot problems like this.
I see no sign of any bugs in the image finder,
but finding images is an inherently fragile process (as soon as the UI shifts shade or resolution in any way at all, the stored pattern loses its link to what is really on screen).
Image finding is very rarely the right solution for any problem.
What are you trying to do ?
FFS. I did not mean to delete that.
Thanks for the response.
- This has been ongoing all year, in every macro I make. restarting the computer makes no difference.
- It is already set to "best".
- the display flag finds the image with 1% accuracy. The macro might work 10 to 40 times in a row. Then after numerous iterations, it just fails to find it, despite it being right there. Even with fuzziness turned up to the max, it just cannot find it. This typically happens worse when the window is right at the top of the screen. (finder window) I drag the window down a bit and then run the macro again and it can find the image. I am absolutely sure it is a bug.
- The image contains a screenshot of text. It makes no sense as to why it just randomly cannot find something that is right there, and then when its moved a tiny bit, it finds it, despite nothing in the actual contents of the window being changed.
- Sorry cant show it, proprietary.
As you're looking for text, you might find this method a lot more reliable:
Ignore the precise area in my macro screenshot, and change it to whatever works for your situation—it sounds like the window might move onscreen, so you'd probably want to use one of the "window" matches.
For the text recognition, make sure it's set to Apple Text Recognition, though that only works with English (or perhaps a small number of languages?), as it's wicked fast and accurate.
Once saved to a variable, you can search it, compare it, whatever.
I've had great success with that three-action setup when I'm trying to find text onscreen.
-rob.
I do not have an official source for this but I have reason to believe that, from MacOS Ventura onwards, eleven other languages are supported (counting Chinese Traditional and Chinese Simplified separately).
Understood. That's fair.
We want to replicate your bug. We really do. So you could replace your "proprietary text" with "non-proprietary text", to illustrate the bug to us, and upload it. If we can replicate the bug, it's fairly likely the bug will be fixed, or at least we could find a workaround. But without being able to see any sanitized version of your macro, it's very difficult to replicate your description of a bug.
Ok thanks. This is the step. It easily finds the image 9 times out of 10. And then it just won't find it. Dialing up the fuzz to 99% it still doesn't find it. Grabbing the finder window and just moving it a little bit, and then it can find it again. With no other changes whatsoever to the macro, to the window, to anything.
note, I am not resizing the window. I am not changing the contents in any way. I am just picking up the window by its top bar and just moving it by about 20px and then trying the macro again, and then it works. The image is a screenshot of a part of a filename. In this case it says
- TELEGRAM.txt
But it doesn't really matter what the image is. Every macro I create has this issue, with any image, in any finder window. Trying to give as much detail as I can here.
You didn't upload the macro, so we can't check some things like the actions' properties or the image well itself. I'll do my best with what you gave us, but uploading the macro is better.
At first glance, I think the problem may be that your macro is too fast. Try putting a pause before the Move/Click action. That may fix it. OOPS, you did. I'm so sorry. Let me think some more.
Since I can't see if your UI is "animating" or not, I recommend increasing the Pause to a longer time. Another possible solution is to check off the flag "Wait for Image" in the cogwheel. I can't see if you did that because you didn't upload your macro.
Thanks, I will try the "wait for image". I'm not doing that so might as well try.
I do put short pauses between pretty much every single step of every macro! Not doing so is the #1 cause of breakage in my experience - and I think that's universal.
I don't think it explains this though. Because otherwise, the macro would routinely fail. In this case, it works a string of times in a row and then will not work again full stop until I move the finder window (or restart KM). It's as though the ability to find the image is somehow crashing until its brain is restarted.
I'm not entirely sure what exactly you are trying to do, only that you are looking for some text as an image in a finder window.
But....If you just looking for specific text in a filename in the current finder window, there's no reason to use a found image. You could just search the top level directory of the frontmost finder window with a macro like this:
It could be a timing issue, and it can sometimes be tricky to diagnose a timing issue without seeing a video of the process. I know you don't want to show proprietary data, but you can probably find something non-proprietary and make a video clip of something that fails.
As Evan says, there are possibly other ways to make this work. I'm a big fan of OCR. I think you could probably use OCR in this case. But you are free to keep using Find Image if you want to.
There's a stroing chance that something in your approach is causing the problem. I call Find Image thousands of times per day on hundreds of different images and it's very reliable.
I just tried increasing the pause to 2 seconds. It makes absolutely no difference - as expected:
If it was a timing issue, it would predictably be so. As mentioned, it works every time until it doesn't, and then it will not work again until I move the window, then it works again.. for a while.
Could it possibly be something to do with the way that OSX renders fonts?
It's honestly bizarre to me that nobody else has this issue. It's an absolute workflow killer, I can't just set something to run all day, but have to watch over it continually. I use this app on multiple computers all day every day. Believe me I have beat my head against the wall for months trying to fix it. Nothing makes sense. I knew that if I dared to suggest it was a bug that nobody would believe me. Because if things are bugs, then everyone has the problem. That's logical.
note also that when it doesnt work, the "go" function that is used to test the image finder, also will not find the image. So it's completely independent of any other steps.
Just a thought, but have you checked possible transparency issues? Often 'find image' will fail for me because of macOS's transparent windows. I haven't tried testing the Reduce transparency
display setting though, so I don't actually know if it would help at all.
interesting. Its just a finder window in column view with a white background, it's not transparent in any way.
It seems to be jamming up. Using the go function, I can quickly get to an instance where it just will not find the image. Clicking "go"several times, no dice. Then when I move the window I get a "vapor trail" of the green squares of all the non-executed go steps as soon as I grab the top bar of the window....
The sidebars tend to have some transparency to them. A particular case for me is finding and clicking on images in Messages.app, but the transparency of the sidebar means the image might not be found if there's a window behind it that doesn't conform to the standard dark mode theme.
well it was the main part of the window. But I gave it a shot, I just tried the 'reduce transparency' setting in accessibility, and it didn't fix it.