You probably know all this, but in case I can fill in a hole...
findFirst returns a UIA element, whereas findAll returns an array of them.
ForEach should be able to loop through findAll results, and in JAWS versions 16
and up, .count will give you the number of results. I believe they index
starting at 0; so results(0) will give you the first one. I could be wrong on
that; I always have to test this one because I mix up what starts at 1 and what
at 0. Note though that we have to use parentheses here, not brackets,
because this is a COM structure and not a JAWS array.
On Mon, Feb 12, 2018 at 01:57:30PM +0000, Bob wrote:
Hi All
I am trying to offer a user a selection of buttons from a toolbar.
Each screen tends to have two toolbars
If I do:
Condition = UIA.CreateIntPropertyCondition(UIA_ControlTypePropertyID,
UIA_ToolBarControlTypeID)
Results = MainObject.FindFirst(TreeScope_Subtree, Condition)
I find the first toolbar
However if I change it to:
Results = MainObject.FindAll(TreeScope_Subtree, Condition)
Then I get zero results.
I have tried different element types such as TabItems and I get the same
behaviour.
In case it makes a difference this is using Jaws 18 on 32-bit Windows 7.
Thanks for any ideas!
Bob
__________???
View the list's information and change your settings at
//www.freelists.org/list/jawsscripts
--
Doug Lee, Senior Accessibility Programmer
Level Access
mailto:Doug.Lee@xxxxxxxxxxxxxxx http://www.LevelAccess.com
"While they were saying among themselves it cannot be done,
it was done." --Helen Keller
__________�
View the list's information and change your settings at
//www.freelists.org/list/jawsscripts