[jawsscripts] Re: find descendent window

  • From: "Geoff Chapman" <gch@xxxxxxxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Fri, 29 Nov 2013 08:56:26 +1100

Doug this is probably a totally stupid newby green question to ask, but, 
why, goodness me why, for such a seemingly so regularly needed and useful 
type of functionality, wouldn't there be a more elegant way in jaws of 
locating a given window?

i guess there *must* be a technical reason other than mere short-sightedness 
on the part of the script language creators, but, is there?
or is it just like the whole Aray thing, which it took till jaws 11/12 to 
even introduce, when I remember people had been ruing the lack of such an 
apparently  normative programming language feature, for years before that.


----- Original Message ----- 
From: "Doug Lee" <doug.lee@xxxxxxxxxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Friday, November 29, 2013 5:31 AM
Subject: [jawsscripts] Re: find descendent window


> Using hierarchical position to find a window is a bit time-consuming
> if you're trying to get to it, but a bit less if you're just trying
> to identify a window you already have.
>
> GetWindowHierarchyX(hwnd) and GetWindowHierarchyY(hwnd) will give
> you an idea where a window can be found in the hierarchy, provided
> you already have a window handle. The trick here, though, is that
> you need the GetWindowHierarchyX value for each level from that
> window up to the top, if you want to find the window again later.
>
> I say it's time-consuming to find the window later because there's no
> function in JAWS scripting to go straight to the nth window at a
> level, so you have to loop once for each level until you get to the
> right window for that level.
>
> In physical terms, it's like this: I'm hiding out on a leaf.
> GetWindowHierarchyY tells you I'm four branch splits from the tree
> trunk, and getWindowHierarchyX tells you I'm the third leaf on my
> branch. The problem is, you don't know where my branch is on the
> branch it comes from, or where that one is on the one it comes from,
> etc. You need something like, "Go to the second branch from the trunk,
> then the fifth branch from that one, then the second branch from that,
> and then the third leaf on that one." This takes a bit of doing in
> JAWS.
>
> On Thu, Nov 28, 2013 at 12:41:37PM -0500, Bissett, Tom wrote:
> Thanks Dug for responding.  I do get what you are saying.  I was hoping I 
> could maybe find the descendent window by its position in the hierarchy 
> and then grab its handle from there.  This may not have been clear from my 
> original request.
> Maybe this is more clear.  Its may be just to cumbersome to be practical 
> as well.
> Regards
> Tom Bisset
> -----Original Message-----
> From: jawsscripts-bounce@xxxxxxxxxxxxx 
> [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee
> Sent: November 28, 2013 12:13 PM
> To: jawsscripts@xxxxxxxxxxxxx
> Subject: [jawsscripts] Re: find descendent window
>
> What I'm about to say is honestly not meant to sound flippant, but I'm 
> still afraid it might:
>
> Most any search tactic will require that you know what you're looking for, 
> so I'm having trouble identifying specifically what is troubling you. 
> FindDescendantWindow requires a control ID. I find useful and unique 
> control IDs rather scarce these days, so I usually use FindWindow instead, 
> as it can search by window class name, window name, or both at once. If 
> your application sports unique and consistent control Ids, you can use 
> findDescendantWindow to good advantage though.
>
> On Thu, Nov 28, 2013 at 11:49:32AM -0500, Bissett, Tom wrote:
> Hi,  I have been trying to figure out how to find a specific descendent 
> window based on higharchy but haven't clude in yet.  FindDescendentWindow 
> requires that you know what you are looking for so this does not work for 
> me.
> Can any one point me in the right direction?
> Thanks
> Tom Bisset
> __________???
>
> View the list's information and change your settings at 
> http://www.freelists.org/list/jawsscripts
>
> --
> Doug Lee, Senior Accessibility Programmer SSB BART Group - 
> Accessibility-on-Demand mailto:doug.lee@xxxxxxxxxxxxxxxx 
> http://www.ssbbartgroup.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 
> http://www.freelists.org/list/jawsscripts
>
> __________???
>
> View the list's information and change your settings at
> http://www.freelists.org/list/jawsscripts
>
> -- 
> Doug Lee, Senior Accessibility Programmer
> SSB BART Group - Accessibility-on-Demand
> mailto:doug.lee@xxxxxxxxxxxxxxxx  http://www.ssbbartgroup.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
> 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: