I just started using Keyboard Maestro and I love it! I've just setup an action that goes to a specific application and does some actions there and after that minimize the application.
What I want to achieve is that Keyboard Maestro makes me go back to the application/window I was at when starting the action. So for example:
I press the hotkey
The action begins to run. Keyboard Maestro goes the application.
Keyboard Maestro executes some actions
Keyboard Maestro minimized the application. 5. Keyboard Maestro opens the application I had open before I pressed the hotkey.
As @tiffle says, if you're only going to one application for this macro, the simplest solution is to add an Activate Last Application action at the end of it. If the macro involves switching between multiple applications, or you just want to be completely sure, you can set a variable at the start of the macro that records the current app's name, then use that variable at the end to activate the original app:
I'm switching to an application and clicking the mouse and would like to maintain the mouse position and switch back to the previous app. Everything works fine except it doesn't always switch back to the previous app. It seems like it's switching to the previous app really quick and then switches back to Pocket Casts again.
I also tried setting the application name as a variable and the same results happen it seems. Anything I'm doing wrong?
@gglick's method didn't work for me either. Adding a pause right before the "Activate Last Application" seems to work. I set it to "1 hundredths" and that works and is quick enough to not even notice. Thanks!