Created
April 25, 2010 06:09
-
-
Save kosugi/378196 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* Growl Toggler *) | |
(* based on http://veadardiary.blog29.fc2.com/blog-entry-2449.html *) | |
tell application "System Events" | |
set isRunning to (count of (every process whose name is "GrowlHelperApp")) > 0 | |
end tell | |
if isRunning then | |
tell application "GrowlHelperApp" | |
set the allNotificationsList to {"Growl Toggler"} | |
register as application "Growl Toggler" all notifications allNotificationsList default notifications allNotificationsList icon of application "GrowlMenu" | |
notify with name "Growl Toggler" title "Growl" description "stopped" application name "Growl Toggler" | |
end tell | |
delay 5 | |
tell application "GrowlHelperApp" to quit | |
else | |
tell application "GrowlHelperApp" to launch | |
tell application "GrowlHelperApp" | |
set the allNotificationsList to {"Growl Toggler"} | |
register as application "Growl Toggler" all notifications allNotificationsList default notifications allNotificationsList icon of application "GrowlMenu" | |
notify with name "Growl Toggler" title "Growl" description "started" application name "Growl Toggler" | |
end tell | |
end if |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment