Tuesday, August 28, 2012

New Terminal Tab in Mac OS X

I haven't really used this for anything, but it seems that interfacing with the GUI through Command Line is a worthy skill to learn.

osascript -e 'tell application "Terminal" to activate' -e 'tell application "System Events" to tell process "Terminal" to keystroke "t" using command down'

In Mac OS X, it will open a new Terminal tab. More specifically, it will send the key combination "Command-T" to the application called "Terminal". I wonder if Terminal needs to be open for this to work.

Anywho, I think I'll come back to this later! And thanks to these commenting dudes:

http://stackoverflow.com/questions/7171725/open-new-terminal-tab-from-command-line-mac-os-x

No comments:

Post a Comment