我正在尝试自动选中将启用辅助功能设备访问权限的复选框。
下面是我打开正确设置窗口的代码。但是,它没有设置复选框。
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.universalaccess"
end tell
tell application "System Events"
set theCheckbox to checkbox "Enable access for assistive devices"
tell theCheckbox
if not (its value as boolean) then click theCheckbox
end tell
end tell
答案 0 :(得分:1)
您只需将其设置为启用
即可tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.universalaccess"
end tell
tell application "System Events" to set UI elements enabled to true