"Activate Application" very sluggish

Hello all. I want to create a macro so I can quickly check new email messages in Airmail and then hide Airmail when I press space bar.
When I trigger the macro, Airmail emerges from the dock very slowly, maybe 3-4 seconds, then takes another 4-5 seconds to refresh email previews.

Is this the best approach?

Also, what's the best way to allow me to choose to either a) continue the macro and hide Airmail by pressing space bar, or b) quit macro by pressing escape?

Thank you!

Does Airmail open quickly when you do a normal Mac CMD-TAB?
If so, then it should activate quickly from KM.

You might try UNCHECKING this:

Normally that is not needed, and could be the cause of the delay.

Interesting...the main window doesn't appear when activating Airmail either through the macro or CMD-TAB, but the "Reopen Initial Windows" was definitely slowing it down.

I changed it to activate Airmail then use internal Airmail shortcut CMD-1 to show inbox. Works fine now.

Thanks for the tip!

Now I need to add the continue macro / end macro decision...let's see if I can figure it out.

Here's the final. Having two steps to test for Escape doesn't seem all that elegant, but it works.

What modifiers are you using on your trigger? If your trigger has the Shift key, then that causes the slow unminimize from the Dock, perhaps that is what you are seeing?


You’re exactly right, Peter. I was using SHIFT-COMMAND-0.

Changed the hotkey, and I can go back to the original macro.


Peter, I’ve never heard of that. The page you linked was about slow minimize, NOT slow unminimize. I’ve tried this manually, and clicking on an app in the Dock while holding down the SHIFT key does NOT cause a slow activate.

IAC, why would the KM trigger have any effect on this?

Keyboard Maestro has nothing to do with this.

If a window is minimized or unminimized while the shift key is down, the system does the animation in slow motion.

So if the target application has a minimized window as its only window, and you activate it and it unminimizes it and the shift key is down, the unminimizing will be slow.

But for that to happen you have to continue to hold down the SHIFT key.
I just tested this with an Outlook window I had minimized. I clicked on the Window menu, held down the SHIFT key, and clicked on the minimized window. But I immediately released the SHIFT key, and the window unminimized normally.

So, if I trigger a KM macro with a SHIFT key and immediately release it, the KM Action to activate (unminimize) the app should work normally.

Sure, but people are often slow to release the modifiers. They release the key quickly (it is tapped), but the modifiers are often held down for a significant amount of time.

An alternative is to add a Pause Until the modifier Shift is Release action. So the action will wait for you to release the Shift key and then activate the application. If you release the shift key quickly, then all is good, and if not, it will patiently wait for you to release it and then open activate the application.