Skip to content

Instantly share code, notes, and snippets.

@Gurpartap
Created October 26, 2020 17:06
Show Gist options
  • Select an option

  • Save Gurpartap/37f6d3f47a6e5320f319fa7b8c466992 to your computer and use it in GitHub Desktop.

Select an option

Save Gurpartap/37f6d3f47a6e5320f319fa7b8c466992 to your computer and use it in GitHub Desktop.

Revisions

  1. Gurpartap created this gist Oct 26, 2020.
    20 changes: 20 additions & 0 deletions RotateDisplay.scpt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    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