Skip to content

Instantly share code, notes, and snippets.

@lgw4
Last active September 2, 2015 21:08
Show Gist options
  • Save lgw4/9679514 to your computer and use it in GitHub Desktop.
Save lgw4/9679514 to your computer and use it in GitHub Desktop.
Rotate resolution between 1280 x 800, 1440 x 900, and 1680 x 1050 on MacBook Pro 13" Retina, Yosemite version
-- Rotate Resolution (between 1280 x 800, 1440 x 900, and 1680 x 1050)
-- MacBook Pro 13" Retina, Yosemite version
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
tell radio group 1 of group 2 of tab group 1
set isRetinaOptimized to get value of radio button 2
set isMoreSpace to get value of radio button 3
end tell
if isRetinaOptimized then
click radio button 3 of radio group 1 of group 2 of tab group 1
else if isMoreSpace then
click radio button 4 of radio group 1 of group 2 of tab group 1
else
click radio button 2 of radio group 1 of group 2 of tab group 1
end if
end tell
quit application "System Preferences"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment