Skip to content

Instantly share code, notes, and snippets.

@matthewmueller
Created November 13, 2012 19:59
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 matthewmueller/4068007 to your computer and use it in GitHub Desktop.
Save matthewmueller/4068007 to your computer and use it in GitHub Desktop.
Cycle through webdev apps
property i : 1
set apps to {"Google Chrome Canary", "Sublime Text 2", "iTerm"}
set devapp to item i of apps
if appIsRunning(devapp) then
tell application devapp
activate
end tell
end if
if i ≥ the length of apps then
set i to 1
else
set i to i + 1
end if
on appIsRunning(appName)
tell application "System Events" to (name of processes) contains appName
end appIsRunning
@bjorkstam
Copy link

sexy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment