Macro to Re Open List of Menu Bar Apps Not running

I wanted to improve/add functionality to a Macro I run every morning when I get to my computer. It essentially just re-launches all of my menu bar apps that open on the system start up , every so often I’ll notice one of the apps is no longer open.

This just activates (or re-launches) those apps with 2.5 seconds in between. I don’t mind the

I feel like there could be a more elegant solution using the If / Else case “If App is not running”: but once I started building it out it it was getting VERY long and a bit more complicated with that many if / else statements.

I’d also love to add a notification for apps that were not running and had to be re-launched. Adding a notification after each step seems easy enough but I think a notification at the end of the macro with a list would be smoother.

Does anybody have a macro like that that’s a bit less elementary than what I am using?

System Start Up.kmmacros (23.1 KB)

Had you considered using a Switch (aka Case) statement instead of If? Doing so may tidy things up quite a bit. See Switch/Case Action.

That really should not be happening.

For your consideration, I have two completely alternate ways of solving this problem (although they don't do the exact same thing as your macro.) There's nothing wrong with your method, but I just want to mention two different ways. (You may already know about these ways, but I still want to mention them.)

First, if you place your apps in your Application Bar, then you can right click on them and choose the option "Open at Login." This will automatically launch them at login.

Second, you can create a macro that looks like the following. Notice the trigger that says "at Login". You can place all of your apps into this macro. It won't matter if the apps are already running at login for some other reason.

I have two more macros that don't do what you ask, but are related.

First, this macro will restart an app when it closes. You can either create a different macro for each app this way, or with a little more magic, it's possible to write a single macro that can do this.

And the next macro will announce the name of any app that launches. I've been using it for months now. It's not for everyone, but I've grown used to it announcing the name of the app I'm switching to whenever I switch apps.

I have not used Switch / Case before so this is a good thought. Thank you!

1 Like

If you want fewer actions and don't mind a little AppleScript, try this macro that opens the listed apps that are not already running :

Open List of Menu Bar Apps Not Running.kmmacros (3.7 KB)

Macro Image

This opens them in the background using a shell command, but you'll see I left in a disabled action that activates the apps in case that interests you.

I would again mention that it is most unusual that some of your menu bar applications are, apparently, silently quitting. You might find a workaround using KM, but the underlying issue should be looked into. Perhaps the MacOS Console utility will give some clues.