Skip to content

Instantly share code, notes, and snippets.

@sashkab
Created March 2, 2014 21:20
Show Gist options
  • Save sashkab/9314109 to your computer and use it in GitHub Desktop.
Save sashkab/9314109 to your computer and use it in GitHub Desktop.
AutoLaunch.scpt for iTerm
-- Save it as $HOME/Library/Application\ Support/iTerm/AutoLaunch.scpt
tell application "iTerm"
activate
set myterm to (make new terminal)
tell myterm
launch session "Default Session"
-- split horizontally
tell i term application "System Events" to keystroke "D" using command down
-- split vertically?
tell i term application "System Events" to keystroke "d" using command down
delay 2
tell the current session to write text "echo hello"
-- move to upper split
tell i term application "System Events" to keystroke "]" using command down
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment