【发布时间】:2023-09-20 05:06:01
【问题描述】:
有什么方法可以在苹果脚本中按 Fn 键?理想情况下,我希望能够“按”两次以启动语音输入。
提前致谢!
【问题讨论】:
标签: applescript voice-recognition keystroke keystrokes
有什么方法可以在苹果脚本中按 Fn 键?理想情况下,我希望能够“按”两次以启动语音输入。
提前致谢!
【问题讨论】:
标签: applescript voice-recognition keystroke keystrokes
delay 0.5 -- time to release modifier keys if the script is run with a keyboard shortcut
tell application "System Events"
key code 63 -- fn
key code 63
end tell
有关密钥代码,请参见 Events.h 或 my website。
【讨论】:
在 applescript 中,您的文件路径必须是 macpath 而不是 unixpath,即用冒号(而不是正斜杠)分隔目录,例如,
tell application "Finder"
open folder "Macintosh HD:Users:username:Library:Speech:Speakable Items"
end tell
【讨论】: