Skip to content

Instantly share code, notes, and snippets.

@tapajos
Created July 13, 2012 00:24
Show Gist options
  • Save tapajos/3102021 to your computer and use it in GitHub Desktop.
Save tapajos/3102021 to your computer and use it in GitHub Desktop.
tell application "iTerm"
activate
tell (make new terminal)
tell (launch session "initial_session") to write text "cd ~/workspace/project1; clear"
tell i term application "System Events" to keystroke "D" using command down
tell last item of sessions to write text "cd ~/workspace/work/project2; clear"
tell i term application "System Events" to keystroke "d" using command down
tell last item of sessions to write text "cd ~/workspace/work/project3; clear"
end tell
make new terminal
tell the current terminal
activate current session
launch session "Default Session"
tell last item of sessions to write text "cd ~/workspace/work/project4; clear"
tell i term application "System Events" to keystroke "D" using command down
tell last item of sessions to write text "cd ~/workspace/work/project5; clear"
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment