Applescript 脚本系统首选项显示设置
如何使用AppleScript设置系统首选项->显示->缩放->更多空间 我一直到:Applescript 脚本系统首选项显示设置,applescript,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"
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试试这个:
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"
试试这个:
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"
在macOs Sierra上更改屏幕分辨率的小命令行脚本
#!/usr/bin/osascript
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 first tab group
click radio button "Scaled" of first radio group of first tab group
tell first radio group of second group of first tab group
set isDefault to get value of second radio button
end tell
if isDefault then
click last radio button of first radio group of second group of first tab group
else
click second radio button of first radio group of second group of first tab group
end if
end tell
tell application "System Preferences"
quit
end tell
在macOs Sierra上更改屏幕分辨率的小命令行脚本
#!/usr/bin/osascript
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 first tab group
click radio button "Scaled" of first radio group of first tab group
tell first radio group of second group of first tab group
set isDefault to get value of second radio button
end tell
if isDefault then
click last radio button of first radio group of second group of first tab group
else
click second radio button of first radio group of second group of first tab group
end if
end tell
tell application "System Preferences"
quit
end tell
你知道怎么做吗?你知道怎么做吗?