Last active
February 13, 2019 19:53
-
-
Save andrzejkaszkowiak/23364f67fd137d26d1dc91944620f282 to your computer and use it in GitHub Desktop.
Switch resolution on iMac (Pro) 5K
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" to tell tab group 1 | |
if (value of radio button "Scaled" of radio group 1) = 0 then | |
click radio button "Scaled" of radio group 1 | |
click radio button 5 of radio group 1 of group 1 | |
else | |
click radio button "Default for display" of radio group 1 | |
end if | |
end tell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" to tell tab group 1 | |
if (value of radio button "Scaled" of radio group 1) = 0 then | |
click radio button "Scaled" of radio group 1 | |
select row 2 of table 1 of scroll area 1 | |
else | |
click radio button "Default for display" of radio group 1 | |
end if | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment