vizual.menace Posted March 19, 2007 Share Posted March 19, 2007 (edited) I wrote a little script to detect displays for me that I just put in my login items so it does it automaticly on login. Hope it helps someone. Here is the script. tell application "System Preferences" to activate delay 2 tell application "System Events" tell process "System Preferences" click menu item "Displays" of menu "View" of menu bar 1 delay 3 tell button "Detect Displays" of group 1 of tab group 1 of window "Display" to click end tell end tell Edited March 19, 2007 by vizual.menace Link to comment Share on other sites More sharing options...
p1truman Posted June 15, 2009 Share Posted June 15, 2009 Hi Why does this script not work in osx 10.5.6 ? Whats Changed ? Many thanks in advance P Link to comment Share on other sites More sharing options...
riws Posted June 15, 2009 Share Posted June 15, 2009 Hi Why does this script not work in osx 10.5.6 ? Whats Changed ? Many thanks in advance P It works fine in 10.5.6. Link to comment Share on other sites More sharing options...
ziorkon13 Posted May 30, 2010 Share Posted May 30, 2010 Hi The script does not work for me in OSX 10.6.3 I got the error: System Events got an error. Can't get button "Detect Displays" of group 1 of tab group1 of window "Display" of process "System Preferences". Any idea what needs to be changed? Many thanks in advance. Link to comment Share on other sites More sharing options...
vizual.menace Posted May 30, 2010 Author Share Posted May 30, 2010 Have you tried adding a keyboard shortcut to do this go to system preferences/keyboard/keyboard shortcuts hit the plus sign type in Detect Displays Then add a shortcut logout or restart and give it a try, i cant verify that this works! let me know if not and i can write a new script Link to comment Share on other sites More sharing options...
Dell Inspiron 15 Posted June 3, 2010 Share Posted June 3, 2010 works fine Link to comment Share on other sites More sharing options...
fess . Posted October 14, 2010 Share Posted October 14, 2010 The script does not work for me in OSX 10.6.3 didn't work for me in 10.6.4 I adjusted it, basically adjust the target for the click: tell button "Detect Displays" of window 1 to click here's the whole thing. this one also quits system prefs at the end, and I took out the delays. I didn't seem to need them. 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 tell application "System Preferences" to quit P.S. thanks to the OP for rapidly leading me to a solution. Link to comment Share on other sites More sharing options...
Recommended Posts