我正在使用Applescript将最后复制的内容粘贴到任何当前字段.它将与VoiceOver一起使用,并且密钥代码方式(我知道的方式)始终不起作用.
tell application "System Events" to key code 9 using command down
say "paste"
Run Code Online (Sandbox Code Playgroud) 以前,这可以通过 Mountain Lion 上的 Applescript 完成。这是因为它针对系统偏好设置来调整亮度。OSX 10.9 Mavericks 中的系统偏好设置不再有此设置。任何有关此问题的指导将不胜感激。谢谢。
更正,我的投影仪一直插着电源,所以当脚本运行时,它会跳转到“投影仪”窗格而不是滑块所在的“内置显示”窗格。我在想这样的事情会针对具有滑块的“内置显示”窗格。我似乎无法让它工作。
tell application "System Preferences"
reveal anchor "displaysDisplayTab" of pane id "com.apple.preference.displays"
tell application "System Events" to tell process "System Preferences" to tell window "Built-in Retina Display"
delay 1
set value of slider 1 of group 1 of tab group 1 of window 1 of process "System Preferences" to 0
end tell
quit
end tell
Run Code Online (Sandbox Code Playgroud)