When I connect an external display I need a script to automatically:
1. Check if external monitor is connected by detecting the "Attachment" tab exists.
2. Activate the "Attachment" Tab to focus.
3. Turn ON the mirroring only if it's off.
Set Resolution as:
4. "Optimize for" -> "Built-in Retina Display" (changing combobox).
5. "Scaled" (Radio button selection) .
6. "Select 1440 x 900". (option which is on the left of default).
I have a MacBook Pro 2017 running macOS 10.13, High Sierra, and a FullHD external display.
I prefer "scaled" down resolution of 1440 x 900 for most work instead of my system's default resolution of 1680 x 1050.
When sometime I connect the external display the MacBook Pro changes the resolution as per the external display and I then always need to resetup.
I have been trying to write up a applescript but not been able to get through. I dont want to use any extra apps like SwitchResX for this single case.
I have already tried the scripts at Is it possible to change display resolution with a keyboard shortcut? The script returns the error:
System Events got an error: Can’t get radio group 1 of group 1 of tab group 1 of window "Built-in Retina Display" of process "System Preferences". Invalid index.