문제

Is there any way to keystroke the Fn key in apple script? Ideally I would like to be able to "press it" twice in order to launch voice typing.

Thanks in advance!

도움이 되었습니까?

해결책

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

See Events.h or my website for the key codes.

다른 팁

In an applescript your file path has to be a macpath not a unixpath i.e., separate the directories with a colon (not a forward slash) e.g.,

tell application "Finder"
    open folder "Macintosh HD:Users:username:Library:Speech:Speakable Items"
end tell
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top