Show Notification Message


#1

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)

Introduction

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.

The 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

  1. Unzip the “dagware Notification Applets”, and put them somewhere logical, perhaps in “~/Library/Application Support/Keyboard Maestro”.

  2. 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:

  1. 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.

Some notes:

  • 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.


Notification insert button? (or feature request)
#2

Dan,

What’s the difference between your plugin and the standard KM Action for Notifications:


#3

The difference is that you can specify whether to have an “Alert” or “Banner” notification.

Sorry - I guess I should make that more clear. I’ll go back and edit my original post.


#4

Yeah, it would be nice if @peternlewis could add that option into the Notification Action.

So is the key difference that “Alert” popup stays on the screen until you dismiss it?
If that’s the case, then could you just use the KM Alert Action?


#5

You could, except it takes focus away from your app. Both my and KM’s Show Notification use OS/X’s Notification Center. The difference is, the KM editor, and the KM engine, can only be set to one or the other - Banner or Alert. Mine lets you have both.

I really did a bad job of explaining the purpose of this plugin, didn’t I? I’m usually really good at these types of things. Don’t know where my head was.

I’ll re-work the entire post.


#6

So, you want an Alert that stays on the screen until you dismiss it, but does NOT receive focus, and that the user can just ignore, if he/she so chooses, right?

Since you are into video, maybe a short video of how your plugin works would be useful.


#7

Right.

That might be a good idea.

I was so involved in the technical details of getting it to work, I forgot that other people have no idea what I’m talking about! Thanks for pointing it out. Like I said, I’m usually really good at this kind of thing. Must be old age. :stuck_out_tongue:


#8

Yes, it would be nice if I could, I quite agree. But you’ll need to chat with Apple about that unfortunately.


#9

OK, I’ve re-done the original post. Let me know what you think. Thanks.


#10

Dan, great job! That’s an outstanding writeup! :thumbsup:


#11

Thanks. It’s more like what I usually do.

By the way, you got me laughing with your replies. You were leading me along so I would come up with a better explanation - what a great way to handle that! You have much more tact than I do. :slight_smile:


#12

I was able to install the Keyboard Maestro plugins, but I couldn’t seem to get the dagware apps to be recognized in my notification preferences (even though I moved the apps to the recommended location and opened each one). Did I miss something?

P.S.
Happy New Year! :slight_smile:


#13

Happy New Year to you, too!

Did you run each of them once by double-clicking them? If you don’t do this, the system won’t recognize them.


#14

I did, but something else was messing it up. Apparently my notification center was corrupted (figured that out when it wouldn’t open). Luckily, a Stack Overflow article outlined steps to fix it, and your apps now work perfectly :slight_smile: anywho, thanks for the tips!


#15

Glad you got it working!

Just curious - do you remember the Stack Overflow link? I have some issues with my notification center as well, so it might be useful for me. Thanks.


#16

Sure, I went digging around a bit and I’m pretty positive that this is the link—http://apple.stackexchange.com/questions/152064/how-do-i-re-enable-notification-center-in-yosemite-or-el-capitan-post-upgrade (just don’t forget the restarting your Mac afterwords bit)


#17

Hello thank you for creating the plugin. How do I design a macro so that I can pause it and perform an action by pressing “shows”? For example, open an app.


#18

@DanThomas Thank you for this great work and I really think it'll help me out in many cases, just like sometimes you just wanna a notification won't go away but you don't want a window pops out. But It seems that I've come across a installing issue here.

I followed your instruction step by step. But I can't see dagware in the notification preferences.

Here's what I've done for debugging (But nothing changes):