Skip to content

Instantly share code, notes, and snippets.

@hc5duke
Created July 24, 2009 19:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hc5duke/154479 to your computer and use it in GitHub Desktop.
Save hc5duke/154479 to your computer and use it in GitHub Desktop.
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