Page 1 of 1

[SOLVED]notification center

PostPosted: Sun Jul 13, 2014 12:49 am
by dduff617
anyone know how to post a notification from an indigo action using the notification center interface in Mac OS X?

for certain categories of things like battery warnings, i would like to put a notification somewhere where it will persist until cleared as opposed to just logging or sending email. notification center seems well-suited for this.

Re: notification center

PostPosted: Sun Jul 13, 2014 1:08 am
by dduff617
i should have searched a bit more as this is much simpler than i expected. for simple notification (in Mavericks), you can use a simple applescript thusly:
Code: Select all
 display notification "hello from indigo!" with title "A demo notification from the Indigo Mac Application"
maybe at some point, it will be possible to respond or react to a notification in more sophisticated ways in the next version of mac os x. example: display a notification saying "Iron was left on" with a button to turn it off, though i suspect the API and the work involved with hooking up Indigo to handle this might be much more complex. for now, this this works and is nice and simple.

Re: notification center

PostPosted: Sun Jul 13, 2014 5:08 am
by jalves
Good find! I'm going to play with this a bit to figure out how to include variable values in the notification.

Oh, just for those who run Indigo on a separate machine, be aware that the notification only shows up on the machine that is actually running Indigo. It doesn't show up on a machine running the Indigo client.

Re: notification center

PostPosted: Sun Jul 13, 2014 6:32 am
by DaveL17
Yes, good find! Works well on the host machine. I had hoped that the alert would promulgate to all of the devices linked to that iCloud account, but that doesn't seem to be the case.

Thanks for sharing!
Dave

Re: notification center

PostPosted: Sun Jul 13, 2014 7:35 am
by jay (support)
You can also use the Growl plugin - Growl puts notifications in the notification center and can do network notifications and iOS notifications.

Re: [SOLVED]notification center

PostPosted: Tue Jul 29, 2014 2:41 pm
by manoncloud9
Can you post an example using growl.

Re: [SOLVED]notification center

PostPosted: Wed Jul 30, 2014 3:13 pm
by jay (support)
Just use the Notification Actions->Growl Notify action. If you have Growl installed and configured correctly the notification will show up.