Created
July 24, 2009 19:04
-
-
Save hc5duke/154479 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
tell application "GrowlHelperApp" | |
set the allNotificationsList to {"Debug"} | |
set the enabledNotificationsList to {"Debug"} | |
register as application ¬ | |
"AppleScript Growl" all notifications allNotificationsList ¬ | |
default notifications enabledNotificationsList ¬ | |
icon of application "Script Editor" | |
end tell | |
set debug to false | |
set myText to "" | |
set alreadyOpen to false | |
tell application "System Events" | |
repeat with processValue in processes | |
if ((file of processValue) as string) contains "Swivel This" then | |
set alreadyOpen to true | |
end if | |
set myText to myText & " | |
" & (name of processValue) & "=" & (file of processValue) | |
end repeat | |
if not alreadyOpen then | |
tell application "/Applications/Swivel This!.app" to activate | |
if debug then | |
tell application "GrowlHelperApp" | |
notify with name ¬ | |
"Debug" title ¬ | |
"Swivel This" description ¬ | |
"looped: " & myText application name "AppleScript Growl" | |
end tell | |
end if | |
else | |
tell application "GrowlHelperApp" | |
notify with name ¬ | |
"Debug" title ¬ | |
"Swivel This" description ¬ | |
"Campfire already running!" application name "AppleScript Growl" | |
end tell | |
end if | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment