Re: GUI Scripting: Change Monitor Colors
Re: GUI Scripting: Change Monitor Colors
- Subject: Re: GUI Scripting: Change Monitor Colors
- From: Simon Forster <email@hidden>
- Date: Tue, 31 Dec 2002 19:34:43 +0000
On Tuesday, December 31, 2002, at 05:50 PM, Barbara Mueller wrote:
You can "probe" for all the available GUI elements. Take a look at
the example script supplied by Apple called "Probe
Window.applescript" found in /Library/Scripts/UI Element Scripts/ or
by following the "Example Scripts" alias found in the
/Applications/AppleScript/. Using the basic principles given in this
script you can dig down through a window's hierarchy of UI elements
and, if need be, get the properties of each.
Indeed, this is a good idea.
Unfortunately the PrefPane "Displays" only has the buttons close, zoom
and minimize as UI interfaces. It is not possible to have access to
pop up buttons and radio buttons
Not true.
tell application "System Preferences"
activate
end tell
tell application "System Events"
get properties
tell process "System Preferences"
tell pop up button 1 of group 1 of tab group 1 of window "Color LCD" to
return get properties end tell
end tell
Returns:
{value:"Thousands", minimum:missing value, maximum:missing value,
title:missing value, subrole:missing value, description:"pop up
button", size:{185, 25}, focused:false, selected:missing value,
enabled:true, name:missing value, role:"AXPopUpButton",
orientation:missing value, help:missing value, class:pop up button,
position:{578, 169}}
Which suggests that this is what you're after.
ATB for the New Year
Simon Forster
___________________________________________________
LDML Ltd, Office One, 16 Canham Road, London, W3 7SR, UK
Tel: +44 (0)20 8749 7766 Fax: +44 (0)70 9230 5247
___________________________________________________
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.