[jawsscripts] Re: Focus To Control ID

  • From: Steve Matzura <number6@xxxxxxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Fri, 09 Jul 2010 12:09:08 -0400

Hi Doug:  That would be great, but how can I be sure I'm starting at
the root of the tree, so to speak?  Program opens, plops me somewhere.
Now, is that window I want above me, below me, or on the same
hierarchical level as I am currently?  And do I have to call that
function for every branch along my current position to ensure
neighboring windows don't have child windows, etc.?  In other words,
who does the tree traversal, me, or the function?


On Fri, 9 Jul 2010 09:21:47 -0400, you wrote:

>I think you want the FindDescendantWindow function.
>
>On Fri, Jul 09, 2010 at 08:22:06AM -0400, Steve Matzura wrote:
>Since you can only set focus to a window by its handle, the only thing
>I can think of to re-create your function is to write a tree-walker,
>which does what HRM does, but in an automated fashion--namely, the
>F2/Shift+F2 functionality and the TAB/Shift+TAB functionality to
>inspect each and every window of the application to find its control
>ID and match it against the one you want.  When you find it, save its
>handle in a handle variable, then you can do whatever you need to
>because you know how to get there and set focus to it or do whatever.
>Funny thing about this is, I took two weeks of scripting class at FS
>two years ago, and this is the one thing I never got to figure out how
>to do.
>
>On Fri, 9 Jul 2010 06:36:25 +0100, you wrote:
>
>>Hi All,
>>
>>I used to have a function that would set the focus to a specified control ID
>>but somehow it has disappeared. Does anyone have a suggestion for this?
>>
>>Regards,
>>
>>Mike
>>
>>__________???
>__________???
>
>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: