Applescript中的按键Fn(功能)键

时间:2013-07-21 00:27:11

标签: applescript voice-recognition keystroke keystrokes

有没有办法在苹果脚本中击键Fn键?理想情况下,我希望能够“按下”两次以启动语音输入。

提前致谢!

2 个答案:

答案 0 :(得分:2)

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

答案 1 :(得分:0)

在applecript中,你的文件路径必须是macpath而不是unixpath,即用冒号(不是正斜杠)分隔目录,例如,

tell application "Finder"
    open folder "Macintosh HD:Users:username:Library:Speech:Speakable Items"
end tell
相关问题