tell application "System Events"
set isRunning_Growl to (count of (every process whose name is "GrowlHelperApp")) > 0
set isRunning_Google to (count of (every process whose name is "Google Notifier")) > 0
end tell
if isRunning_Google then
tell application "GrowlHelperApp"
set the allNotificationsList to {"Growl Toggler"}
register as application "Growl Toggler" all notifications allNotificationsList default notifications allNotificationsList
notify with name "Growl Toggler" title "Notifications OFF" description "" application name "Growl Toggler" icon of application "Automator"
end tell
delay (2)
tell application "Google Notifier" to quit
tell application "GrowlHelperApp" to quit
else
tell application "Google Notifier" to launch
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
notify with name "Growl Toggler" title "Notifications ON" description "" application name "Growl Toggler" icon of application "Automator"
end tell
end if