【发布时间】:2019-04-20 23:00:50
【问题描述】:
我的应用程序有问题,我希望 AppleScript 在终端中输入“日期”:
(
activate application "Terminal"
tell application "System Events"
keystroke "date"
keystroke return
end tell
)
它可以工作,但如果我的键盘语言设置为俄语,我的应用会键入“####”而不是“日期”。如何让 AppleScript 始终使用英文键盘映射?
【问题讨论】:
-
抱歉,无法帮助您解决俄语/英语问题。你为什么使用系统事件和
keystroke?只需使用终端的do script命令,例如tell application "Terminal" to do script "date" -
谢谢,但是...例如。我需要写我的系统密码(例如“qwerty”)。它转换为“йцуке”...
标签: applescript