GUI Scripting to click on "Detect Displays"
GUI Scripting to click on "Detect Displays"
- Subject: GUI Scripting to click on "Detect Displays"
- From: Gil Dawson <email@hidden>
- Date: Sat, 4 Aug 2007 11:09:17 -0700
Hi--
When I plug my 12" PowerbookG4 into a large screen, Tiger
reconfigures the displays so that both screens are useable. If the
Powerbook is closed when I plug it in, however, only the large screen
is usable, even if I later open the Powerbook. I have found that I
can activate the second screen simply by clicking on the "Detect
Displays" button in the "Displays" tab of the "Displays" pane of
System Preferences.
I thought I'd share an Applescript to do this that I made out of
parts I found in these archives:
tell application "System Preferences"
activate
reveal anchor "displaysDisplayTab" of pane id
"com.apple.preference.displays"
tell application "System Events"
tell application process "System Preferences"
tell window 1
tell group 1 of tab group 1
click button "Detect Displays"
end tell
end tell
end tell
end tell
quit
end tell
Thanks for your collective help. You sure make it easy.
--Gil
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden