Where can I find tips for making the image easier for Keyboard Maestro to find it in the “Move and Click from the Center of the Found image” action? (Its a hit and miss in my macro).
Any help will be greatly appreciated.
Well, there is of course: action:Find Image on Screen [Keyboard Maestro Wiki] … and related challenges have been the subject of various forum discussions. If you would like to post a macro that you have problems with I’m sure someone will be able to offer further ideas.
Generally just ensure the image is not small or gray, or especially small and gray.
Small gray images (aka letters) appear all over the screen and thus are hard to match.
The larger the image and the more unique colourful content it has the better the matching will work.
Also, try to limit the search area if possible. Smaller search areas can allow Keyboard Maestro to be more diligent in searching them.
Thank you Kevin and Peter.
I read the Wiki and tried to search for the answers here in the forum and in google, but explanations were either too complicated for me or didn’t work.
It’s such a basic/simple macro that I didn't think it’s worth/needed to post but if I can’t make it work I'll post it with as much info as I can.
Will try again and if still problematic will post the macro.
Thanks again.
OK, so I tried again. I tried also to define an area so it should be easier to find the image but… doesn’t work still.
I’m trying to build a macro that, after I hover on an email in my gmail spam folder, I hit the trigger and the macro will open the email, open the 3 dots menu, choose “Block “whatever user””, confirm block, open the menu again, choose “Report phishing”, confirm and then deleted the email forever.
Following are screenshots to make it simpler to understand: (sorry for the huge size, I know that once I found how to “shrink” them to a smaller size but this time I couldn't) (will be happy to hear about the way to do it).
Email block and report phishing (v11.0.4)
Email block and report phishing.kmmacros (83 KB)
You don't show the images you are searching for, so it's impossible to suggest if they are reasonable or not.
You also have no pauses in there at all, which means if any of those actions takes any time to complete, then the click might fail - is Wait For Image enabled in the actions in the Gear menu? If not, the first one that takes any time to happen is likely to fail.
Also, you don't say which of the actions is failing - you can use the View ➤ Go to Last Aborted Action to see which one is failing.
Thank you Peter.
“You don't show the images you are searching…” Sorry, long time user, long time “forgetter”… ![]()
Following is the macro showing the images.
All Move and Click actions have now Wait for Image enabled.
Used View ➤ Go to Last Aborted Action. It’s failing in the 2nd M&C action (click on Block this email)
Also tried to define the area instead of “all screens”
Email block and report phishing FF Macro (v11.0.4)
Email block and report phishing FF.kmmacros (83 KB)
Email block and report phishing FF Macro (v11.0.4)
Email block and report phishing FF.kmmacros (83 KB)
Please upload the actual macros -- I'll bet you're trying to but are falling foul of the new Forum posting interface.
Switch out of the "new Rich Text Editor" by clicking the M↓ at the top-left of the editing area

...and you'll be able to drag in your macros and have them upload.
But you are scanning an huge area that contains a lot of text which, to an image engine, is very similar to the "Block" text. You could start by limiting the area to where the menu will be.
Better yet -- once that menu is on-screen, can you down-arrow to highlight items then Return to select?
First, thank you for paying attention to those details and your help!
I thought I was defining a small area. I read again the Wiki and some older posts, experimented and learned how to define a smaller area. I also took better screenshots of the image and it helped.
I succeeded to bring the macro to work in many cases.
I switched out of the "new Rich Text Editor" and now I will be able to copy/paste here the macro.
Now I need to take a break. I will go on working on it in the next few days and when I will have a macro with the specific problems left I'll post it again here.
In the meantime, thanks a lot for all the advice and direction you all (you, Peter and Kevin) gave me!
Sorry, forgot to mention. This would have been my first priority, but (and that's the limitation- at least the way I see it) of this macro: it's not a continuous/steady image, it changes from mail to mail.
And now, that I switched to "old good/regular" edit mode I also got back the choice of size of image I want to show...
Turn on the Display option in the action and see where Keyboard Maestro is trying to click. The Display option will highlight the matches.
You may want a pause after the first click to allow the menu to appear.
Also if the menu "unrolls" or "slides" on to the screen, then Keyboard Maestro, if waiting for the image, can find the image as it slides around and end up clicking the wrong place.
How is the action failing now, is it timing out now that you enabled the Wait option?
You could handle your spam folder with ease if you were to use an email client rather than a Web interface, but I understand that Google Almighty has now removed that standard option. I appreciate that you may have particular reasons to continue using Gmal[1], but if not, may I suggest that you have found yet another reason to move to an alternative service—one that supports IMAP and which has some respect for privacy.
Of course, you do not have to justify your choice or requirements to me or to anyone else: I am just identifying, perhaps, the root of the problem here!
That was a typo, but I am not moved to correct it. ↩︎
Fun fact one -- the items below the "Block" menu item don't (at least in my testing) change.
Fun fact two -- if you pop the menu then use the up-arrow key you can work up the menu.
So try
OK, so, I'm back to proudly present my beautiful macro that's working wonderfully, and all thanks to you guys, that baby stepped me through!!!
I integrated all you said in one macro and I'm indefinitely thankful to you!!!
Some remarks:
1- Peter, thank you for devoting your time and knowledge to help me. Kevin, thank you for replying promptly and suggesting how to go on with the right foot. Nige_S, thank you for pointing me in the right direction (although my first reaction was slapping my forehead and saying "How didn't I think of that!!!!" and for all your help.
2- Although it's now working and problem solved, I would like to know if it can work also if we make the macro work based only on the Move and Click on Found Image actions. If you think it can, I would like to ask for your help and try to do it, just for the sake of learning something new and implement it in future macros.
If you don't feel like "babysitting" me anymore, it's OK... I can live with that...
Anyway, I am SOOO happy and appreciate very much the time you devoted and guidance!!!
Spam emails in Gmail block and report phishing Macro (v11.0.4)
Spam emails in Gmail block and report phishing.kmmacros (28 KB)
I don't have many good reasons for that, except that this is what I know and using my whole life (something like the horse that knows it's way to the stable)... ![]()
I do use duckduckgo, and the macro is for a relative of mine with learning disabilities that gets in trouble for not understanding all kind of things like that.
Generally if you can make your macro work using typing, that it better than clicking.
For menus, if you can “type ahead” (ie, type the name of the menu), that is much more robust than clicking (or arrowing) since even if the menu changes slightly, the macro will likely continue to work.
Sequences of typing also have the advantage of being queued by the system so they always happen in the correct order (though if the focus changes, that can be an issue, and if you are intermixing them with other things, that can require pauses).
Thank you Peter for EVERYTHING you do and for what you are (for YEARS of seeing and experiencing it!).
You belong to a "very rare species" and I really think you are one in a million.
This forum is unparalleled and special different from most of others and the reason is the head of the pyramid!
Thank you Peter! ![]()









