Skip to content

Instantly share code, notes, and snippets.

@chmurph2
Created October 15, 2010 21:20
Show Gist options
  • Save chmurph2/628969 to your computer and use it in GitHub Desktop.
Save chmurph2/628969 to your computer and use it in GitHub Desktop.
tell application "System Preferences" to activate
tell application "System Events"
tell process "System Preferences"
click menu item "Displays" of menu "View" of menu bar 1
tell button "Detect Displays" of window 1 to click
end tell
end tell
delay 1
tell application "System Preferences" to quit
@chmurph2
Copy link
Author

Taste it.

@chmurph2
Copy link
Author

Delay 1 seems to be enough time to detect the displays before quitting. May need adjustment.

@chmurph2
Copy link
Author

Bound it to ⌃⌥⌘ d with FastScripts.app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment