tell application "iTerm" to activate
delay 0.1
tell application "System Events" to tell process "iTerm"
keystroke "Lsj!"
end tell我想知道怎样才能正确地输入一些字符。击键命令无法识别大小写。
发布于 2017-03-17 13:26:16
这应该是可行的
set the clipboard to "Lsj!" as text
tell application "iTerm" to activate
delay 0.1
tell application "System Events" to tell process "iTerm"
keystroke (the clipboard)
end tell发布于 2017-03-17 14:58:25
Wch1zink的答案应该是有效的。
如果需要,您也可以逐个写出字母
keystroke "l" using {shift down} -- uppercase
keystroke "sj!" -- lowercase发布于 2017-11-14 17:13:30
这应该是可行的
tell application "iTerm" to activate
delay 0.1
tell application "System Events" to tell process "iTerm"
key code 37 using {shift down}
key code 1
key code 38
end tellhttps://stackoverflow.com/questions/42837448
复制相似问题