I have a macro that "launches" (activates) Stream Deck.app when the Stream Deck USB device is attached. Activating the app brings it to the front, and I would like to dismiss it and return to the previously active app. No matter the approach, it seems I have to insert a hard Pause between activating Stream Deck.app and returning to the previously active app for it to work. "Pause Until...This application is running" does not work - Stream Deck.app stays active. A Pause for 1.5 seconds seems to work, but anything less is inconsistent. Here is what I have:
BTW, I also tried using "Activate Last Application" instead of using a variable, but that also requires a hard Pause and it doesn't seem to recognize Keyboard Maestro as the last application so it skips to the last active application before Keyboard Maestro.
So my question is, why doesn't "Pause Until...This application is running" not work?