In OS X, how do I set up an AppleScript to
- open a new iTerm2 tab
- change to a directory
- clear the console
- echo the current directory
I had something like this before for regular Terminal, but I can't even find the scripting guide for iTerm2.
applescriptitermmacosterminal
In OS X, how do I set up an AppleScript to
I had something like this before for regular Terminal, but I can't even find the scripting guide for iTerm2.
Best Answer
Daniel's solution somehow opens a new Window – also, the
exec command
statement does not work as expected. One has towrite text
instead.Also, you have to use
in order to get a new tab.
The following does what you asked for: