KM9 Can't Find the Image

I've been building a ton of macros to use with Facebook Ads Manager to make my job & life easier.

Some of my macros look for and click a 'Create Now' button in the Ads Manager UI. Only now, KM is clicking on the Apple menu for some reason. Thinking of downgrading to 8.x.

1 Like

You may need to do a new screen shot (using the macOS tool) of the target image, and paste into the KM Action Image well, OR, just increase the "fuzziness" of the image that is allowed using the slider:
image

Your best option might be to rewrite some of your macros with the browser actions like "Click a front browser link"

Same issue here. I tick "Display" and it highlights the target image green, so there's no issue there, it's not a fuzziness problem. No matter what it clicks the Apple menu. From a quick check, all my found image macros are messed up since the 9.0 update. Madly trying to downgrade atm

Several people have mentioned a problem with this, but I can't duplicate it, so I will need to know what the common factor is.

Is there anything reported in the Engine.log file?

What OS are you using?

Does the Find Image action work, does it return the correct information.

Does the Click Action work if specific values are used?

Same Issue - numerous macros - clicking the apple icon in menu bar.
Retook image screenshot
Don't see anything in the logs
Video link
'''https://www.dropbox.com/s/0ih8kwt2imwr5kb/Image%20error.mov?dl=0'''

Sorry I'll be out for the rest of the day so will not be able to continue to help troubleshoot.

Additional note: the image does turn green when the display botton is checked.

Later that same day.....

If I change the pop up from unique to best in the 'click on found image' action, the macro performs as expected.
Would there be a way to go thru all the macro actions of clicking on a found image and changing that pop up from unique to best?

In Keyboard Maestro 9, the action allows setting what to do if multiple matches are found - whether to require a unique one, or the best one, or the left most one or whatever.

But what I don't get is that in version 8, the only option was to require a unique match, so I don't understand why the macro would have worked before if it is matching multiple positions on the screen.

As for how to change all of them, short of quitting everything and editing the Keyboard Maestro Macros.plist XML file, or maybe writing a similar script via AppleScript, no there is no way to change them all.

But as I say - they should all have been unique in version 8, so I don't understand why they were working. I also don't understand why when it fails it is clicking at 0,0, but that I can understand as a bug in the new version.

I have 1 cpu still running versions 8
It runs the macros fine, all 'click at found image's' work correctly.
My cpu running version 9 with all 'click at found image's' set to unique - do not work.
When I change them to 'best' they work.
I have over 60 macros with click at found image actions
within my 1600 macros.
I'll need to go thru them and change them manually.
It can be done.

One thing to check is the fuzz level. Although I don't think it should have, it is possible the fuzz levels have changed slightly in v9. If so, an image that was unique in v8 might not be unique in v9. With Display on, this would show up as multiple orange images with similar fuzz levels.

If you can create an appropriate macro that I can specifically test with existing images on the screen, then I am happy to take a further look.

I appreciate your offer Peter,
At this point I've changed all of my image actions to 'best' and they work fine.
Great software, great forum, thank you.

Count me in with this issue. Apple Menu every time. All of these same macros worked perfectly before KM9 upgrade.

The relevant entries from engine.log reads:

2019-08-19 17:10:04 Execute macro ‚ÄúSpark - Add Signature‚ÄĚ from trigger The Hot Key ‚Ć•Space is tapped twice
2019-08-19 17:10:06 Move or Click Mouse no unique image found.
2019-08-19 17:10:06 Move or Click Mouse no unique image found. Macro ‚ÄúSpark - Add Signature‚ÄĚ cancelled (while executing Move and Click at (0,0) from the Center of the Found Image).
2019-08-19 17:10:06 Execute macro ‚ÄúSpark - Add Signature‚ÄĚ from trigger The Hot Key ‚Ć•Space is tapped twice
2019-08-19 17:10:08 Execute macro ‚ÄúSpark - Add Signature‚ÄĚ from trigger The Hot Key ‚Ć•Space is tapped twice
2019-08-19 17:10:08 Move or Click Mouse no unique image found.
2019-08-19 17:10:08 Move or Click Mouse no unique image found. Macro ‚ÄúSpark - Add Signature‚ÄĚ cancelled (while executing Move and Click at (0,0) from the Center of the Found Image).
2019-08-19 17:12:37 Execute macro ‚ÄúSpark - Add Signature‚ÄĚ from trigger The Hot Key ‚Ć•Space is tapped twice
2019-08-19 17:12:38 Move or Click Mouse no unique image found.
2019-08-19 17:12:38 Move or Click Mouse no unique image found. Macro ‚ÄúSpark - Add Signature‚ÄĚ cancelled (while executing Move and Click at (0,0) from the Center of the Found Image).

I've increased fuzziness: no luck. If I had to I could redo all of the screen grabs, but wow, what a PITA that would be. :flushed:

@dashard , I found that changing the pop up from unique to best fixed all of my errant macros.

Months ago (KM v8) I had some mouse macros and I saw my mouse moving, unexpectedly, near to the Apple menu. Similar to what I'm reading in some posts here. My issue may have been unrelated to this week's problem, but it may provide a clue as to what's causing it now.

It turns out what caused it was that my action had the wrong setting regarding the "relative to" part of the Move Mouse action. When you switch that part of the action, the action sometimes ends up sending the mouse to a very different location, but because the mouse MUST stay on the screen the action keeps the mouse along the edge of the screen which is the closest location to the user's new mouse placement numbers.

In fact, you don't even have to switch the "relative to" part of the action for this effect to occur. All you have to do is change which window is active. Eg, if a different window is active, then the statement "Move Mouse to +100, -100 points relative to the top left of the front window" would send you to a different location. And sometimes that could end up being off screen, which could push the mouse to the Apple menu corner.

Perhaps this problem could be detected if the KM action actually caused an error when the numeric value of the mouse location would take the mouse off screen. The action does have an error test, but the test does NOT cause the action to fail if you try to send the mouse off screen. Perhaps that should be making it fail, at which point the location of the bug would be more apparent. Making this change could make a lot of people's macros fail so I doubt Peter would make that change, but he could make it a change that only takes effect if you click on an option in the Preferences window.

Looking at the code, I cannot see how it both reports that error and also simulates a click.

Send me (support@stairways.com) the ‚ÄúSpark - Add Signature‚ÄĚ macro, ideally together with your ‚ÄúKeyboard Maestro Macros Saved Version 7.plist‚ÄĚ (which despite its name should have a recent modification date) so I can see if there is any issue in the upgrade process.

Peter,

See attached the macro. Using the current working fix of changing the 'unique' setting to 'best' has fixed this for me as well. Just note that the macro settings are now 'best,' but the logged failures were using 'unique.'

Also, there are two images sequentially which was a kind of debugging test to see if KM wanted a new/updated image. Didn't seem to matter.

Best ‚ÄĒAD

Spark - Add Signature.kmmacros (38 KB)

(Attachment Keyboard Maestro Macros Saved Version 7.plist is missing)

OK, looking at this:

image

The first action has Notify/Abort turned off and the second one exhibited the behaviour described (clicking in the Apple menu).

So in this case, if the first one was failing, and the second one was resulting in a non-unique match, then that would explain getting the error messages in the log (from the first one), and then the second one fails because it was non-unique, but still clicks (but on the Apple menu because it failed).

I have fixed this, so it now properly fails if the click is not unique. But I still do not understand the behaviour change. That said, the fuzz on this action is very high, so it is not surprising that it matches several images. What I don't understand is why it would have worked in v8, although it is possible the fuzz levels have changed somewhat.

Turning on Display with the actions showing, the second action shows 0% fuzz for its own image, and 20% fuzz for the image in the first action, both of which match, hence it fails to be unique.

Changing this to "Best" should not be necessary, just dropping the fuzz levels down below 20% should be appropriate. Unless this really is trying to match something that requires that level of fuzz, but in that case you are likely to get false matches because that really is set to a very high fuzz level.

I presume the Find Image code was something you did not write yourself, but comes from some GPL licensed software on the web. Maybe you upgraded the GPL code for your v9 release.

The fuzz is always on the default (20%?). The only reason the fuzz was increased here was for troubleshooting, though point noted.

As noted in the forums, changing nothing but "Unique" to "Best" fixed it. FWIW.

I have a macro based on Click at Found Image. Worked fine until upgrading to KM9.

Switching from "Unique" to "Best" solved the problem.

I tried several things before that. Added some pausing. Refreshed the image. Nothing worked. Then I searched the forums, found this thread, and switched to "Best" match. Problem solved.