Handling existing windows/apps when creating automations to configure workspace

Hi everyone!

I’m trying to create an automation (primarily using Keyboard Maestro) to setup my workspace for a particular task, e.g. by launching the right apps, opening a web browser to a couple pre-defined URLs,
laying out the windows, etc.

I’ve been able to get it mostly working, but so far it assumes that there is no other app/window open when I run the macro to give it a consistent “blank slate” starting position.

I am now trying to improve the automation so that it can be run even if there are existing windows/apps but am running into some difficulties. I was wondering if people who have similar workspace-setup automations could share how they handle this - do they only run their automations when nothing else is running? Do you have your automation hide and/or minimize all your existing windows before it launches the desired apps? Any advice/tips would be helpful for me!

Switch to a different space and run your automation.

2 Likes

Yes, new space, or have KM trigger cmd+opt+h after positioning the first window to hide everything else and then set up the rest of them. Welcome!