Q: Script to switch between 2 resolutions
I'm fairly new to OSX (bought my first MAC last summer)
I find myself switching between 2 resolutions on my retina MacBook Pro.
I use 1920x1080 at work (professionaly, I run Windows8 in Fusion6 to manage the IT infrastructure) and 1280x720 at home (in the couch, with half an eye on the TV)
To switch between these 2 resolutions, I do the following steps
- CMD+SPACE
- type "display"
- ENTER
- use the mouse to switch to another resolution
- press OK
Wouldn't it be easyer if I had 1 program that:
- switches to 1920x1080 if the current resolution is 1280x720
- switches to 1280x720 if the current resolution is 1920x1080
A "shortcut" (or whatever it's called in OSX) on the desktop, or even with a key-combination would be great.
Any insights?
MacBook Pro (Retina, Mid 2012), OS X Mountain Lion (10.8.2), 16GB 256SSD w/ VMwareFusion
Posted on Sep 10, 2013 12:41 PM
Hi GeertCu,
Sure:
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"
Posted on Oct 31, 2013 1:46 AM


