Show Notification Message
This plugin allows you to show a standard Notification Center message, just like Keyboard Maestro’s “Notification” action, except it gives you the ability to specify whether you want a “Banner” or “Alert” notification.
Show Notification Message.v1.0.zip (9.1 KB)
dagware Notifier Applets.v1.0.zip (21.5 KB)
Notification Center messages are those things that pop up in the upper right of your screen. Unlike other kinds of messages, these don’t steal the keyboard focus.
This is an Alert (you have to click a button to make it go away):
This is a Banner (goes away after a few seconds):
In Keyboard Maestro, you display Notification messages using the Notification action:
Alerts or Banners - who decides?
Unfortunately, you have no control over whether a Keyboard Maestro Notification action displays an Alert or Banner.
Well, that’s not exactly true. You use the System Preferences “Notification” pane to indicate which type of notifications Keyboard Maestro and the Keyboard Maestro Engine will display:
But whether you specify Banners or Alerts, that’s the only kind of Notification message Keyboard Maestro can display. At least, without my plugin.
I’ve supplied two AppleScript applets that my plugin uses to show Notification messages. You configure one of them to display Banner notifications, and the other to display Alert notifications. Then my plugin uses one or the other to display your Notification.
(This is an explanation only - the actual steps are described below). You’ll set them up un Notifications Preferences like this:
(By the way, “dagware” is me. It’s my domain name.)
Once this is done, when you use my plugin and select “Alert”, it will send the message through the “dagware Alert Notifier”. It you select “Banner” in my plugin, it will send the message through the “dagware Banner Notifier”.
Installation and Setup
Unzip the “dagware Notification Applets”, and put them somewhere logical, perhaps in “~/Library/Application Support/Keyboard Maestro”.
Run each one once, so it gets registered. Just double-click them - they won’t display anything, but it’s enough to register them. If you want, you can open them in Script Editor to verify what they do, which is this:
- IMPORTANT: Go into System Preferences->Notifications, and set the appropriate Notification type for each. If you don’t, then one or both of them won’t display the Notification the correct way.
Install the “Show Notification Message” plugin zip file:
Drag the .zip file onto the Keyboard Maestro icon in the OS X Dock.
(if updating a previous version of the action, first manually remove the previous copy from the custom actions folder)
- ~/Library/Application Support/Keyboard Maestro/Keyboard Maestro Actions
Then you should be able to use the action in KM.
The “Sound” list is hard-coded from what’s on my system - probably the same as what’s on yours. If not, let me know, and I’ll see what I can do.
“Default” plays a sound called “Default”, which doesn’t exist on my system and probably doesn’t exist on your system, but it will cause “something” to play. On my system, it plays a sound that’s different from any of the ones in the list. That’s why I included it. I’m sure there’s a better way to do this, but it works for now.