在OS X中,如何设置AppleScript以
以前,对于常规Terminal,我有类似的东西,但是我什至找不到iTerm2的脚本指南。
丹尼尔(Daniel)的解决方案以某种方式打开了一个新窗口-同样,该exec command
语句无法按预期运行。一个必须write text
代替。
另外,你必须使用
launch session "Default Session"
为了获得一个新的标签。
以下是您所要求的:
tell application "iTerm"
make new terminal
tell the current terminal
activate current session
launch session "Default Session"
tell the last session
write text "cd ~/Downloads; clear; pwd"
end tell
end tell
end tell
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句