Script to Pause and Resume Growl with a Hidden Menu Icon

Aug 23, '12 07:30:00AM

Contributed by: deviantintegral

Growl includes a feature to pause and resume notifications, which is very useful when giving presentations or screen sharing. Unfortunately, the UI only exposes this feature via the menu icon. With this script you can hide the icon and control notifications via a launcher such as QuickSilver or Alfred.

 * Pause and resume Growl. Use in a launcher like Quicksilver or Alfred to
 * pause and resume Growl when the menu bar icon is disabled.
 * Author: Andrew Berry, deviantintegral@gmail.com
 *)
tell application "Growl"
	register as application "Growl pause/resume" all notifications {"Growl paused", "Growl resumed"} default notifications {"Growl paused", "Growl resumed"} icon of application "Growl"
	if is paused then
		resume
		notify with name "Growl resumed" title "Growl resumed" description "Growl notifications resumed" application name "Growl pause/resume"
	else
		notify with name "Growl paused" title "Growl paused" description "Growl notifications paused" application name "Growl pause/resume"
		pause
	end if
end tell
If you wish to make any improvements to this, feel free to fork the code over at Gist.

Comments (4)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20120804124130314