我正在尝试编写一个可以更改 Lions 滚动条可见性的 applescript(系统偏好设置>常规)。通常我喜欢保持设置在“自动根据输入设备”,但我在家里用的是Wacom数位板,所以我需要切换到Always
这是我到目前为止所拥有的:
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.general"
end tell
tell application "System Events"
if UI elements enabled then
try
tell process "System Preferences"
click radio button "Always"
end tell
end try
end if
end tell
但我总是以错误告终
--> error number -1728 from «class radB» "Always" of «class prcs» "System Preferences"
在“点击收音机...”行
我尝试了各种变化
click radio button 3 of Window 1
click radio button 3 of radio group 1 of window 1 -- error number -1719
我显然做错了什么,但不知道是什么。