Skip to content

Instantly share code, notes, and snippets.

@abbot
Created October 23, 2013 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abbot/7121187 to your computer and use it in GitHub Desktop.
Save abbot/7121187 to your computer and use it in GitHub Desktop.
open new terminal tab
if is_running("Terminal") then
tell application "System Events"
tell process "Terminal"
tell menu bar 1
tell menu "Shell" of menu bar item "Shell"
tell menu item "Linux" of menu "New Tab" of menu item "New Tab" to click
end tell
end tell
end tell
tell window 1 of application "Terminal" to activate
end tell
else
tell application "Terminal" to activate
tell application "Terminal" to activate
end if
return input
on is_running(appName)
tell application "System Events" to (name of processes) contains appName
end is_running
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment