Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local index1, index2
- set index1 to 3 -- 1440 x 900 (Best for Retina)
- set index2 to 5 -- 1920 x 1200 (More Space)
- -- Launch "System Preferences", open the "Displays" options and change to the "Display" tab
- tell application "System Preferences"
- --activate
- set the current pane to pane id "com.apple.preference.displays"
- reveal anchor "displaysDisplayTab" of pane id "com.apple.preference.displays"
- end tell
- local indexToUse
- -- Now lets make the necessary changes
- 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
- end tell
- if isRetinaOptimized 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"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement