以前に、VIRL から iTerm を利用する方法をメモしました。
しかし(iTerm のアップデートに伴ってだと思います、たぶん…)以前の AppleScript のままでは以下のエラーが出るようになりました。
/Users/xxxx/Software/VIRL/AppleScript/iterm.scpt: execution error: iTerm でエラーが起きました:«class Ctrm» を取り出すことはできません。 (-1728)
そこで AppleScript を以下のように修正します。これで VIRL から iTerm が利用出来るはずです。
on run argv -- last argument should be the window title set windowtitle to item (the count of argv) of argv as text -- all but last argument go into CLI parameters set cliargs to "" repeat with arg in items 1 thru -2 of argv set cliargs to cliargs & " " & arg as text end repeat tell application "iTerm" activate if current window exists then tell current window -- These commands return a tab set newTab to (create tab with default profile) tell the current session of newTab set name to windowtitle write text cliargs end tell end tell else set newWindow to (create window with default profile) tell current window -- These commands return a tab set newTab to (create tab with default profile) tell the current session of newTab set name to windowtitle write text cliargs end tell end tell end if end tell end run