我正在尝试将文本从 Apple 脚本粘贴到 iTerm。
\n\nactivate application "iTerm"\ntell application "iTerm"\n tell current tab of current window\n set cmd to "command"\n keystroke cmd\n keystroke return\n end tell\nend tell\nRun Code Online (Sandbox Code Playgroud)\n\n但我收到错误:
\n\n\n\n\niTerm 出现错误:Can\xe2\x80\x99t 获取当前窗口当前选项卡的击键“命令”。
\n
任何想法如何解决这一问题?
\n\n正如我在这里有可用的write text命令https://www.iterm2.com/documentation-scripting.html