我有一个 4K HDR 显示器,有时 Macbook 会导致颜色被洗掉,解决方法是禁用然后重新启用 HDR。我正在尝试创建一个 AppleScript,然后将其合并到 Automator 中。我能够获得一些牵引力,但无法确定如何进行实际的取消检查并识别该组。这是我到目前为止所拥有的:
tell application "System Preferences"
activate
delay 2
set the current pane to pane id "com.apple.preference.displays"
delay 2
tell application "System Events"
click checkbox "High Dynamic Range" of group 2 of window "LG HDR 4K" of application process "System Preferences"
end tell
quit end tell
这是我得到的错误:
error "System Events got an error: Can’t get group 2 of window \"LG HDR 4K\" of application process \"System Preferences\". Invalid index." number -1719 from group 2 of the window "LG HDR 4K" of application process "System Preferences"
任何建议将不胜感激,谢谢。