Skip to content

Instantly share code, notes, and snippets.

@kvpb
Last active May 24, 2022 03:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kvpb/66debe0b89c656e6df4490be723026ad to your computer and use it in GitHub Desktop.
Save kvpb/66debe0b89c656e6df4490be723026ad to your computer and use it in GitHub Desktop.
Change Resolution (Retina) Apple Script

ChangeResolution

Jul 8th, 2012

AppleScript to change resolution as done via System preferences: Displays: Display: Resolution: Scaled.


Credits

Note: I am not the author of this script. I retrieved it after searching on Google and saved it here so a trace is kept but I am not and don't know the author of this script.

tell application "System Preferences"
activate
reveal pane id "com.apple.preference.displays"
end tell
tell application "System Events"
click radio button "Display" of tab group 1 of window 1 of process "System Preferences"
click radio button "Scaled" of tab group 1 of window 1 of process "System Preferences"
--Best for Retina
click button 3 of group 1 of tab group 1 of window 1 of process "System Preferences"
--More Space
--click button 5 of group 1 of tab group 1 of window 1 of process "System Preferences"
end tell
tell application "System Preferences"
quit
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment