And, the other thing about this is, make sure the window you want really does stay in the same position in the hierarchy. Dynamic environments can some times change those relationships, so be ware. I find the GetWindowHierarchyX and y functions to be a bit misleading, because, as Doug tried to explain, two numbers, x and y don't really get you there. They don't contain enough information to uniquely define the window. It's more like a set of directions, that start at the top of the tree, and go down. Each time you descend one window, you need to decide, now do I need to move along to the nth peer on this level, or can I just use the first child. Each time you descend, you need to consult the driving directions, and see if you need to move among peers like that before you descend. Maybe you know you are going to descend. You are just not sure which peer you should descend from. Instead of a simple x, y identification. It is more a long list of driving directions, one for each level. And, a "direction" would say how many times you need to call GetNextWindow on the current level to find the proper window from which to make your next descent. Looks like two nested loops. One to descend a level, and the innner loop to move among peers. ----- Original Message ----- From: "Doug Lee" <doug.lee@xxxxxxxxxxxxxxxx> To: <jawsscripts@xxxxxxxxxxxxx> Sent: Thursday, November 28, 2013 12:31 PM 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