• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Backlight using GUI scripting doesn't work...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Backlight using GUI scripting doesn't work...


  • Subject: Re: Backlight using GUI scripting doesn't work...
  • From: "hackmiester (Hunter Fuller)" <email@hidden>
  • Date: Mon, 9 Oct 2006 11:31:02 -0500


On 8 October 2006, at 18:29, kai wrote:


On 8 Oct 2006, at 22:13, hackmiester (Hunter Fuller) wrote:

Thank you! This works perfectly! However, to be honest, I still have no idea why. Can you elaborate?

Sure, Hunter.

The first line of the script reveals not only the relevant pane, but also the required tab (anchor). Since execution won't proceed until the anchor is revealed, this method not only reduces the clicks required in the UI; it also avoids some of the timing issues that might arise, following a click, while waiting for the target element to appear.

The script's second line defines the path to the target UI element - which is structured as follows:

--------
window 1
--------
3 buttons ("close", "zoom", "minimize")
1 static text (reflecting the window's title)
1 tool bar
1 tab group (* this is obviously the one we want *)

----------------------
window 1 / tab group 1
----------------------
2 radio buttons (representing the tabs: "Display" & "Color")
2 groups

The first of these two groups contains most of the displayed elements...

--------------------------------
window 1 / tab group 1 / group 1
--------------------------------
1 scroll area ("Resolutions:")
2 pop up buttons ("Colors:" & "Refresh Rate:")
2 buttons ("Detect Displays" & "Help")
1 checkbox ("Show displays in menu bar")
3 static texts (the labels for the scroll area & pop up buttons)

However, we still haven't found our slider - so let's move on to:

--------------------------------
window 1 / tab group 1 / group 2
--------------------------------
1 static text ("Brightness")
1 slider (eureka!)

So your original script was trying to locate the slider in group 1, while it was actually tucked away in group 2.

Sweet, so THAT was the issue! Thanks. :-)

The reason I referred to this as the last group (-1), rather than the second (2), is in case additional groups are added in future. Should that happen, the chances are that the one containing the slider will be moved to accommodate them - and thus will remain the last group. (Nothing's certain, of course, but the technique already works quite well with windows containing elements that can be toggled - such as tool bars, or the Address/Bookmarks/Status/Tab bars in Safari, for example.)


I hope that clears up some of the confusion, but yell if my attempt to explain it doesn't do the trick...

Great explanation. You have earned a place in my "useful information" mailbox. :-D

--- kai


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (Applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:
@hackmiester.com


This email sent to email@hidden


-- hackmiester (Hunter Fuller)

<svinx> yknow when you go to a party, and everyones hooked up except one guy and one girl
<svinx> and so they look at each other like.. do we have to?
<svinx> intel & nvidia must be lookin at each other like that right now



Phone Voice: +1 251 589 6348 Fax: Call the voice number and ask.

Email
General chat: email@hidden
Large attachments: email@hidden
SPS-related stuff: email@hidden

IM
AIM: hackmiester1337
Skype: hackmiester31337
YIM: hackm1ester
Gtalk: hackmiester
MSN: email@hidden
Xfire: hackmiester


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Backlight using GUI scripting doesn't work... (From: "hackmiester (Hunter Fuller)" <email@hidden>)
 >Re: Backlight using GUI scripting doesn't work... (From: kai <email@hidden>)
 >Re: Backlight using GUI scripting doesn't work... (From: "hackmiester (Hunter Fuller)" <email@hidden>)
 >Re: Backlight using GUI scripting doesn't work... (From: kai <email@hidden>)

  • Prev by Date: Re: Renaming a copied file with Finder
  • Next by Date: Re: Renaming a copied file with Finder
  • Previous by thread: Re: Backlight using GUI scripting doesn't work...
  • Next by thread: ScreenSaver settings
  • Index(es):
    • Date
    • Thread