Created
November 21, 2011 22:34
-
-
Save Gipetto/1384194 to your computer and use it in GitHub Desktop.
Detect Displays Applescript Trigger
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
# This is an Applescript to trigger the Detect Displays functionality quickly on OS X | |
# 1. save this to a file with a `.scpt` extension | |
# 2. make sure that the Displays menu is set to display in the OS X menu bar | |
# 3. use your favorite quick access app (Spotlight, LaunchBar, Quicksilver, etc...) to call the script | |
# | |
# See: http://top-frog.com/2010/05/29/automatically-download-chromium-nightly-builds/ for a | |
# caveat if you have trouble and are using AppleScript when you have Adobe applications installed | |
to click_menu_extra at menu_list | |
tell application "System Events" to tell process "SystemUIServer"'s menu bar 1 | |
click (first menu bar item whose value of attributes contains menu_list's beginning) | |
repeat with item_name in rest of menu_list | |
click (first menu item of result's menu 1 whose name is item_name) | |
delay 0.5 | |
end repeat | |
end tell | |
end click_menu_extra | |
click_menu_extra at {"displays", "Detect Displays"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment