Window does not close when command via Applescript includes “exit”
By vendomoveis2... on July 22, 2013 22:12 (imported from Google Code)
-
Set “Quit when windows are closed” option, in preferences.
-
Close iTerm2
-
Run, in AppleScript Editor, something that’ll tell iTerm2 to run a command and then “exit”. As a (very) simplified example of my code, something like
tell application "iTerm"
set _term to the first terminal
tell _term to set _session to current session
tell _session to write text "echo 'hello' && exit"
activate
end tell
iTerm2 should run the command, and since the last option is “exit” (which closes the terminal), iTerm2 should terminate as well (due to the option in step 1), but it does not.
Running iTerm2 1.0.0.20130624, Mountain Lion 10.8.4.