Re: Another UI scripting question
Re: Another UI scripting question
- Subject: Re: Another UI scripting question
- From: Bill Cheeseman <email@hidden>
- Date: Mon, 12 Dec 2005 06:00:55 -0500
- Thread-topic: Another UI scripting question
on 2005-12-12 2:04 AM, Brett Conlon at email@hidden wrote:
> Are there elements that you simply cannot UI script?
Yes. UI elements that don't work are usually custom UI elements that are not
based on standard Carbon or Cocoa code, where the developer did not bother
to add the few lines of code that would have made them accessible.
However, if UI Browser can see a UI element (and especially if it can do
things with it using the Perform button in the Actions drawer or the Set
control in the Attributes drawer), then you know it is in fact accessible
because UI Browser uses the same accessibility API that GUI Scripting uses.
> In FreeHand's Print -> Advanced... button there are 3 tabs. "Separations",
> "Imaging" and "Paper Setup"
>
> Using UI Browser I can successfully press UI elements within each of these
> tabs separately but for some reason I can't seem to activate the tabs to make
> the elements visible...ie. if I'm on the Separations tab I can activate
> buttons etc but I then can't set the script to click on the Imaging tab to
> make selections in there.
Tabs are usually implemented as UI elements within a radio group, as I
recall. Instead of clicking a tab, try setting the selected tab of the radio
button group. In some cases this might involve setting the value of the
selection of the radio button group to an integer indicating the desired tab
by index. Experiment until you get this concept to work. Or study the
Attributes page with the tab group elected in UI Browser's main browser
view, and see what likely attributes are settable and what type of value
they accept.
> According to UI Browser it doesn't show anything in the Actions for the tabs,
> though they can be itemised, eg. Separations tab is:
>
> UI element 3 of UI element 5 of UI element 3 of window "Print Setup"
Right. Tabs usually don't have actions, but their containing radio group
usually has selectable or settable attributes.
> I even tried looking up its coordinate and tried simply:
>
> click at {670, 275}
The 'click at' command is very flaky in all cases. But it won't work for
tabs that aren't clickable, anyway.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
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