0

How can I change change screen resolution using AppleScript? If AppleScript can't do it, what about Terminal?

I tried with examples at How to set screen resolution with a keyboard shortcut on Retina MBP?, but they don't work anymore. I'm on MacBookPro Retina.

This is how the script definitively should start:

    tell application "System Preferences"
        activate
        reveal anchor "displaysDisplayTab" of pane id "com.apple.preference.displays"
    end tell
    tell application "System Events"
        tell application process "System Preferences"
          -- insert magic
        end tell
    end tell

Now I just need to click on "Scaled" and select different display resolutions, but I don't know how these buttons are "called".

1

Don't know if still works on current versions of OS X, but somebody wrote a command line tool to get and set resolutions a few years ago: https://github.com/jhford/screenresolution

  • thank you! Although it still works, it doesn't work well. 1440x900 look completely different when set using Displays. Im guessing Retinas weren't around when this was created. – sanjihan May 3 '16 at 19:04
  • I wrote a similar lightweight command line tool (installable via Homebrew) that does support retina screens: github.com/jakehilborn/displayplacer – Jake Hilborn Apr 7 at 17:57
1

We have created a python script, called Display Manager that allows you programmatically set resolution, bit depth, underscan, mirroring, etc.

Give it a try and let us know if you want additional functionality

https://github.com/univ-of-utah-marriott-library-apple/display_manager

0

I've included two scripts in this post for making the display resolution higher or lower. Taking it one step further, I also included the process of assigning keyboard shortcuts.

Changing display resolution with AppleScript

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .