Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'how would you GUI script mail.app?' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
how would you GUI script mail.app?
Authored by: RickoKid on Oct 22, '03 06:19:11PM
You can only specify an element by name if it has a Title element. Most of the elements don't seem to be named .. so you have to specify it by it's index, for example:
text field 2 of window "foo"
Unfortunately, the UI Element Inspector doesn't tell you the index of an element - so I usually just use trial and error. You might expect that the elements would be indexed from the top of the window downwards - but apparently it seems to be all over the place (I suspect it has something to do with the order the developer adds the elements when they design the application). Anyway - in your example the "Incoming Mail server:" text field should probably be text field 4 - but that is actually the "Description:" field! Incoming Mail is the 1st text field:
text field 1 of tab group 1 of sheet 1 of window "Accounts"

---


RickoKid

[ Reply to This | # ]