Skip to content

Instantly share code, notes, and snippets.

@gf3
Created May 28, 2009 15:23
Show Gist options
  • Save gf3/119382 to your computer and use it in GitHub Desktop.
Save gf3/119382 to your computer and use it in GitHub Desktop.
iTerm Automation - Apple Script
tell application "iTerm"
activate
-- Close the first session
terminate the first session of the first terminal
-- New Terminal
set myterm to (make new terminal)
tell myterm
-- Tab 1 (Server)
launch session "Default"
tell the last session
set name to "Server"
write text "cd ~/Projects/rails/gigparkapp"
write text "script/server"
end tell
-- Tab 2 (Autospec)
launch session "Default"
tell the last session
set name to "Autospec"
write text "cd ~/Projects/rails/gigparkapp"
write text "script/autospec"
end tell
-- Tab 3 (Shell)
launch session "Default"
tell the last session
set name to "Shell"
write text "cd ~/Projects/rails/gigparkapp"
end tell
-- Tab 4 (MySQL)
launch session "Default"
tell the last session
set name to "MySQL"
write text "cd ~/Projects/rails/gigparkapp"
write text "mysql -u root gigparkapp_dev"
end tell
-- Tab 5 (IRB)
launch session "Default"
tell the last session
set name to "IRB"
write text "cd ~/Projects/rails/gigparkapp"
write text "script/console"
end tell
end tell
set the bounds of the first window to {0, 0, 1468, 990}
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment