在系统设置中使用Applescript切换单选按钮(实际上是复选框)(MacOS 13.4.1)

问题描述 投票:0回答:1

如何访问系统设置 -> 辅助功能 -> 指针控制 -> 替代指针选项中的复选框?这是找不到它..我已经尝试过锚点名称。是因为它不是复选框吗?它也不是一个单选按钮,尽管它看起来像一个!

 tell application "System Settings"
    activate
    reveal anchor "AX_MOUSE_KEYS" of pane id "com.apple.Accessibility-Settings.extension"
end tell



delay 2



tell application "System Events"
    tell process "System Settings"
        click checkbox named "Alternative Pointer Actions" of window named "Pointer Control"
    end tell
end tell
macos applescript accessibility
1个回答
0
投票

试试这个:

tell application "System Settings"
    activate
    reveal anchor "AX_ALT_MOUSE_BUTTONS" of pane id "com.apple.Accessibility-Settings.extension"
end tell
delay .1
tell application "System Events" to tell application process "System Settings"
    click UI element 8 of group 2 of scroll area 1 of group 1 of group 2 of splitter group 1 of group 1 of window "Pointer Control"
end tell
delay .1
© www.soinside.com 2019 - 2024. All rights reserved.