How to properly set up application launching group?

I’d like to set up a couple of application groups that would open applications on specific spaces.

I’m unsure how to have the macro wait until the app is completely loaded before moving on to open the next application.

I’m trying to use this:
'Pause until Conditions met’
Pause until all of the following are true
This Application:
Activity Monitor
is at the front

for multiple applications, but some applications are opening in the wrong space because the macro has already moved on to open the next app.

For apps like Firefox and XCode, they can take a while to open up and stabilize, so how do I make KM wait until the apps are completely initialized before moving on to the next?

Thanks for any pointers!

There is no good answer to this unfortunately.

Keyboard Maestro’s “Activate Application” waits until the application is at the front.

But for a launching application that may not mean much. Some applications do all their work to get ready when the launch, but others basically launch as an empty slate, and then initialise everything and then open windows and whatever. For those applications, they are finished launching and at the front long before they are really ready to do anything.

Unfortunately, with those kinds of applications there is no general way to tell when it is finished. You might be able to pause until a specific window is the front window. Or perhaps a menu is enabled.

I messed around with it a little more today, and I managed to bend it to my will :wink:

For Firefox, it seems if you have a bunch of windows, on startup, it loads the first one quickly, then the rest get loaded a bit later. Good thing is that the windows all are initialized with 'Mozilla Firefox' right when they are created, and a short time later, initialized with 'Mozilla Firefox - Mozilla Firefox', and finally they are updated with their real titles.
You just have to wait for a few couple-few seconds for the Window menu to be populated with the window list, then check for those windows..

This fixed the biggest problem with this workflow for me.
Fun stuff!


edit: this works for anywhere from 1 to ~15 windows for me. I tried it with a crazy number of windows, like 40, and it put firefox windows up during the next steps. So don't get crazy.

Partial screen cap included for those interested: