Is There a Way to Cancel a Macro Without Throwing Up an Error Dialogue?

Sometimes I need to just halt execution of a script, like if a website is still loading and I need to wait for it to load, then return to a starting point. I currently just use Cancel All Macros if that state is reached, but it puts up an error message that I then need to clear. Is there a way to halt execution without that error?

I have not tried this and I assume that MacroUUID is a pretty unique way to name it,
but you need to save the MacroUUID in a global variable and then have a separate macro via Hotkey combo to cancel it specifically


If the error message you are seeing is the macOS Notification, you can change the behavior from an "Alert" to a "Banner" for KM in the System Preferences > Notifications panel.
Then the message (Notification) will show briefly and then auto-close.

Yes, it's a Mac OS error message. I wouldn't want to turn off all error notifications since I would need them sometimes. I just want to be able to internaionally halt a script without an error, like a "return" command in Applescript.

Thank you Jonathon, will try this tomorrow!

I did not understand.

Me too trying to avoid macro to continue to run even after the error pops up. And the error that I am concerned about is any type of error: either from MacOS or from Keyboard Maestro.

His post is not relevant to your problem...