Closing any "Display Progress" engine window

Is there a way to close any open "Display Progress" windows without setting the variable to 100 or manually clicking the mouse?

I have several display progress actions a lot of different macros, and sometimes when there is a hiccup, myself or another user will run a "Cancel All Macros" macro that includes an action to stop all macros, and close the all windows in the Keyboard Maestro engine, which will dismiss any prompts, or displays, except it doesn't work for display progress actions.

Sure there is. This works for me anyway. Try it out!

tell application "System Events" to tell application process "Keyboard Maestro Engine" to tell (first window whose title is "Keyboard Maestro Progress") to click button 1

EDIT: If you want to avoid errors for the times there are no progress bars, just wrap that line in a try/end try block like so...

try
	tell application "System Events" to tell application process "Keyboard Maestro Engine" to tell (first window whose title is "Keyboard Maestro Progress") to click button 1
end try
3 Likes

Thanks!! This works great, even if the progress bar is named something different, or is showing progress of a loop.

1 Like