我正在尝试单击系统偏好设置的显示面板中的单选按钮,即更改屏幕分辨率。这是我用来识别单选按钮的代码:
tell application "System Preferences"
activate
reveal anchor "displaysDisplayTab" of pane id "com.apple.preference.displays"
end tell
tell application "System Events"
tell application process "System Preferences"
set frontmost to true
get every radio button of window 0
--click button 1 of window 0 of application process "System Preferences" of application "System Events"
--click radio button "Scaled" of radio group of window "com.apple.preference.displays"
end tell
end tell
返回的单选按钮没有。根据我所看到的,窗口的单选按钮为零。这导致一个结论,单选按钮是子窗口的一部分,即显示子窗口而不是主窗口。如何导航到此“子窗口”并单击单选按钮?