脚本系统首选项显示设置

时间:2016-05-17 05:03:02

标签: applescript

如何设置系统偏好设置 - >显示 - >缩放 - >在AppleScript的帮助下获得更多空间?

我到了:

    tell application "System Events"
        tell process "System Preferences"
            set frontmost to true
            click button "Displays" of scroll area 1 of window "System Preferences"
            click radio button "Scaled" of radio group 1 of tab group 1 of window "Built-in Retina Display"

但不确定如何设置"更多空间"选项?

TIA

2 个答案:

答案 0 :(得分:0)

试试这个:

tell application "System Preferences"
     reveal anchor "displaysDisplayTab" of pane "com.apple.preference.displays"
end tell


tell application "System Events" to tell process "System Preferences" to tell window "Built-in Retina Display"
    click radio button "Display" of tab group 1
    click radio button "Scaled" of radio group 1 of tab group 1
    click radio button 4 of radio group 1 of group 2 of tab group 1
end tell
quit application "System Preferences"

答案 1 :(得分:0)

用于更改macOs Sierra上的屏幕分辨率的小命令行脚本

If(a ==b)
{
//do nothing
}
else
{
//do something
}