Skip to content

Instantly share code, notes, and snippets.

@lgw4
Last active September 2, 2015 20:44
Show Gist options
  • Save lgw4/6500295318b69800de21 to your computer and use it in GitHub Desktop.
Save lgw4/6500295318b69800de21 to your computer and use it in GitHub Desktop.
Rotate resolution between 1440 x 900, 1680 x 1050, and 1920 x 1200 on MacBook Pro 15" Retina
-- Rotate Resolution… (between 1440 x 900, 1680 x 1050, and 1920 x 1200)
-- MacBook Pro 15" 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 1 of tab group 1
set isRetinaOptimized to get value of radio button 3
set isMoreSpace to get value of radio button 4
end tell
if isRetinaOptimized then
click radio button 4 of radio group 1 of group 1 of tab group 1
else if isMoreSpace then
click radio button 5 of radio group 1 of group 1 of tab group 1
else
click radio button 3 of radio group 1 of group 1 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