Run Macro When Notification Appears?

Hi all. I'm new to KM and it has completely changed how I use my Mac. That said, I use my Messages app on my computer when I am working (and in another program) and I will get a notification that some one has sent me a new text message. I was wondering if there was a way to activate Messages when this notification appears using KM.

1 Like

Hey Rocky,

Keyboard Maestro can't detect notifications.

Create a macro to Activate a Specific Application, and give it a hotkey trigger.

Then you can activate it at will.


Thanks for the response, Chris. I know I can create an Activate Specific Application, and this is what I was trying to avoid. Instead I wanted the notification to activate the app, allowing me to instantly respond to the text message. I wonder of there is an AppleScript that could handle this?

1 Like


But be my guest – spend 10 hours on the net trying to find a solution...

Here's an attempt at a kludge that didn't go very far:


I should be little more specific.

The notifications center is not scriptable, so anything you attempt to do will have to be AppleScript UI-Scripting with System Events.

There are things you can and can't do via this method, but the NC does NOT broadcast to other apps what its doing – so you can't have a simple listener that is triggered by a notification.