[jawsscripts] Re: find descendent window

  • From: Doug Lee <doug.lee@xxxxxxxxxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Fri, 29 Nov 2013 16:43:40 -0500

If there was, I missed it. I haven't used arrays much because they
have to be fixed-size at creation time. I tend to use collections as
pseudo arrays more often, where an element n is referenced with
c[intToString(n)].

On Thu, Nov 28, 2013 at 03:26:55PM -0500, Jonathan C. Cohn wrote:
Isn't there a split like function that  converts a string into an array of 
strings based on a delimiter?

I seem to remember some code on the list recently that used this.

Best wishes,

Jonathan



On Nov 28, 2013, at 1:31 PM, Doug Lee wrote:

> 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

-- 
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

Other related posts: