[jawsscripts] Re: MSAA

  • From: <travis@xxxxxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Tue, 13 Feb 2018 07:51:28 -0600

Hi,
GetObjectFromEvent() is usually the most reliable.
Here is some commentary from this list many years ago. I'm sorry I did not keep 
a note of who originally wrote it but am sure he/she won't mind.

getObjectFromEvent returns an object from a window by obviously some how 
generating a pointless win event. The parameters this function receives are:

handle window: the window you want to receive the object from, 
int objID: the ID of the object with in the window object ... it can either
be: 
-1 or 0xffffffff: The window's system menu
-2 or 0xfffffffe: The window's title bar (hint, this also contains things like 
the close and minimise buttons) -3 or 0xfffffffd: The window's menu (I think 
this is like the context menu, or if its the main app window, then the normal 
menu bar) 
-4 or 0xfffffffc: The window's client (The client is the part of the window 
which contains any controls like a list view, or edit field, or combobox etc 
etc etc) 
-5 or 0xfffffffb: The window's vertical scroll bar 
-6 or 0xfffffffa: The window's horizontal scroll bar 
-7 or 0xfffffff9: The window's 'sysGrip' --- not too sure what this is 
-8 or 0xfffffff8: The system caret 
-9 or 0xfffffffff7: The mouse cursor 
-10 or 0xfffffff6: The window's alert???  
-11 or 0xfffffff5: The 'sound' object associated with that window 
-12 or 0xfffffff4: This seems to be another way to get the window's class 
(technically its called 'queryClassNameIdx') 0 or 0x0: The window object itself

And just a note, if you just choose to always put 0, rather than one of those 
values, you can always get to any of those objects with an 
let object = object.accNavigate(7,0) (move to first child) and then just move 
along those objects with a 
object =
object.accNavigate(5,0) (move to next object).

The 3rd parameter to getObjectFromEvent is the object child ID. This is useful 
if you have a window with a listview control inside it and you want to only 
deal with one specific list item.

And the 4th parameter is a byref variable, in int that can hold the objectID 
for the object the function returns.




-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx 
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Bob
Sent: Tuesday, February 13, 2018 5:02 AM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: MSAA

I have found how to move up down and across the MSAA object tree but I am 
struggling to create an object reliably in the first place. 

Depending on where focus is GetFocusObject and GetCurrentObject don’t always 
return an object. 

Does anyone have a reliable method to get a start point in the MSAA tree? I 
don’t mind navigating manually once i am in as long as the start is reliable.




On 12 Feb 2018, at 15:19, Bob <temp@xxxxxxxxxxxxxxx> wrote:

Can anyone point me to some examples on creating, finding and navigating MSAA 
objects using Jaws?

I have always avoided using it but it looks like I am going to have to give 
myself a crash course in it this week!

Thanks

Bob

__________ 

View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts



__________ 

View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts


__________�

View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

Other related posts: