Monthly Archives: October 2014
How to use AppleScript to launch several Terminal windows at one time with different commands on OSX
I looked around for this and had a hard time finding it.
tell application "Terminal" set myTab to do script "cd /some/path && run command one" tell (first window whose selected tab is myTab) set the position to {0, 0} set the number of columns to 80 set the number of rows to 24 end tell set myTab to do script "cd /some/path && run command two" tell (first window whose selected tab is myTab) set the position to {570, 10} set the number of columns to 80 set the number of rows to 24 end tell set myTab to do script "cd /some/path && run command three" tell (first window whose selected tab is myTab) set the position to {0, 390} set the number of columns to 80 set the number of rows to 24 end tell set myTab to do script "cd /some/path && run command four" tell (first window whose selected tab is myTab) set the position to {570, 390} set the number of columns to 80 set the number of rows to 24 end tell end tell