0
我正在尝试单击System Prefernces的Displays面板中的单选按钮,即更改屏幕分辨率。这是我用它来识别单选按钮的代码:用AppleScript更改屏幕分辨率
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
返回的单选按钮没有。根据我所看到的,窗口有零个单选按钮。这导致一个结论,单选按钮是子窗口的一部分,即显示子窗口而不是主窗口。我如何导航到这个“子窗口”并单击单选按钮?
我调整“选择行2 ...”得到它的工作的一部分,否则这是伟大的! – sanjihan