Created
October 26, 2020 17:06
-
-
Save Gurpartap/37f6d3f47a6e5320f319fa7b8c466992 to your computer and use it in GitHub Desktop.
Display Rotation Toggle (Landscape/Portrait) AppleScript Shortcut Script for LG Ultrafine 5K Display
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "System Preferences" | |
quit | |
delay 0.3 | |
launch | |
activate | |
reveal pane id "com.apple.preference.displays" | |
tell application "System Events" | |
tell process "System Preferences" | |
delay 0.3 | |
tell window "LG Ultrafine" | |
click pop up button "Rotation:" of tab group 1 | |
if value of pop up button "Rotation:" of tab group 1 is "Standard" then | |
keystroke "90" & return | |
else | |
keystroke "Standard" & return | |
end if | |
end tell | |
end tell | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment