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
This entry was posted in Uncategorized and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s