Hey Hagure - thanks for the script (and for taking the time to make a
10.5 variant). I would love to try it, but I'm sorry to say I don't
know what to do with a UI script. I found out I'll have to enable
Universal Access, but I don't know what to do with the script. I am
comfortable with the bash shell - where do I place the executable file
containing the script, once I've created it? And can I execute it by
having QS launch it? Sorry for my tedious questions. Thanks again.

On Aug 24, 5:50 pm, Hagure <[email protected]> wrote:
> Here's my version of the script, utilizing UI Scripting & the Displays
> Pref Pane (no need for the menubar item). You will have to update the
> window name inside the quotes of the line: (tell button "Detect
> Displays" of window "DELL SP2309W" to click). For example, my MBP's
> window name is the generic "Color LCD".
>
> But sometimes this can be harder to find than you'd think; one of my
> old no-name monitors had a trailing space at the end of it's name. So
> while I typed in what I thought was the window name, I kept getting
> errors. I had to use a uielementinspector program (whose name escapes
> me at the moment) to find the actual name, with the "invisible" space.
>
> Anyway, let me know if it works out for you!
>
> CODE BELOW:
> -----------
>
> (*              Use this instead if you're running 10.5 or lower
>
>                 tell button "Detect Displays" of group 1 of tab group 1 of 
> window
> "DELL SP2309W" to click
> *)
> 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
>                 delay 3
>                 tell button "Detect Displays" of window "DELL SP2309W" to 
> click
>                 delay 3
>         end tell
> end tell
>
> ignoring application responses
>         tell application "System Preferences" to quit
> end ignoring
>
> ----------
> CODE ABOVE

Reply via email to