Help. Application triggered macros stopped working


Recently I noticed that a couple of macros are not working. They run at the launch and quit of an application, Avid Media Composer. I just have them run a simple AppleScript to change the resolution of my screen and then reset it when I’m done using the application. This used to work perfectly. It seems like the macro no longer gets activated or runs when the application launches or quits. So for some reason the trigger is not working.

I don’t know exactly when it stopped, nor what would cause the change. It’s possible that it was somehow caused by the most recent upgrade to KM, but I tried installing older versions to see if the problem would still occur and it did, so I’m doubting that’s the cause. I haven’t changed my OS or anything, so I really don’t know what would be causing the issue and I don’t know how to go about troubleshooting it.

Any suggestions or help would be much appreciated. Thanks in advance.

I’ll take a closer look tomorrow, but until then:

Here's one of them.

Set Resolution on launch.kmmacros (2.4 KB)

Hey David,

What version of macOS are you using?

Have you tried changing the app from Avid Media Composer to something else relaunching it and setting it back?

Have you tried rebuilding launch services? I recommend Onyx (freeware) for this task, but it can be done via the command-line and other utilities.


Hey Chris,

Thanks for the suggestions. I just tried both of them and still can’t get it to work. However when I created a new macro from scratch, and set an application launch trigger, it did work. That led me to trying to recreate the macros and now they seem to be working. So perhaps the macros got corrupted somehow.

Thanks for the help,

Not likely. I’d wager there’s some other explanation.

However, if you want, you can export the macros and post the file here, and I can compare them for you.

The macro you have posted has a “Launches” trigger and it’s in a group that is only available when AvidMediaComposer is active. It should work if you put it into the Global Macro Group (or any other group that is always available).

Whenever a macro does not fire when expected, the troubleshooting process is the same (as described on the wiki Troubleshooting page).

Here is what to do:

  • Ensure the Keyboard Maestro Engine is running - the Keyboard Maestro status menu should show in the menu bar on the right hand side (unless you’ve turned it off).
  • Ensure you have accessibility enabled (click on the status menu and Keyboard Maestro will tell you if there is a problem).
  • Ensure the Macro Group is enabled, and is active in the application in question.
  • Ensure the macro is enabled.
  • Ensure the macro actions are enabled.
  • Add a status menu trigger, and verify that the macro is active by checking for its name in the Keyboard Maestro status menu.
  • Add a Display Text action to the macro to verify that the macro is firing.
  • Choose Start Debugging from the Status Menu, ensure Pause New Macros is turned on, and trigger the macro. Step through the actions to see where it is going wrong.

Basically, you have to discover if the macro is active, if the trigger is firing, or if the actions are failing.

Also, if a macro with a script is failing, the clear fist thing to do is to turn the script from “ignore results” to “display results in a window” so you can see if the script itself is failing or generating an error for some reason.