[jawsscripts] Re: An interesting scripting problem

  • From: Steve Matzura <number6@xxxxxxxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Mon, 07 May 2012 12:14:09 -0400

That's what the documentation says, anyway.

On Sun, 6 May 2012 21:45:50 -0400, you wrote:

>I hadn't noticed this until this thread either, but a first
>FindDescendantWindow parameter of 0 actually seems to work as a means
>of scanning the entire window tree for the first matching controlID.
>
>On Sun, May 06, 2012 at 07:59:51PM -0500, Jim Snowbarger wrote:
>A start handle of 0?  That won't work, will it?
>Don't you need to have a valid handle of some ancestor?
>
>----- Original Message ----- 
>From: "Steve Matzura" <number6@xxxxxxxxxxxxxx>
>To: "jawsscripts" <jawsscripts@xxxxxxxxxxxxx>
>Sent: Sunday, May 06, 2012 9:34 AM
>Subject: [jawsscripts] An interesting scripting problem
>
>
>I'm scripting an application that has a window that's sometimes there,
>sometimes not. The first order of business is to check if the window
>is there, and if it is, set focus to it. I know the control ID of the
>window, 1019. I'm trying to use FindDescendantWindow with a start
>handle of 0 to verify its existence. My script so far looks like this:
>
>Script ReadSearchStatus ()
>
>var handle hwin
>
>let hwin = FindDescendantWindow (0, 1019)
>
>if hwin > 0
>then
>Say ("search window present.", ot_jaws_message, false)
>
>; Insert code to set focus to the window. Should I even bother
>; with this?
>; Should I just try setting focus and if it fails, assume the window's
>; not present?
>
>else
>Say ("search window is not present.", ot_jaws_message, false)
>
>endif
>
>EndScript
>
>The problem is, it always comes up saying the window is present, even
>when it's not.
>__________???
>
>View the list's information and change your settings at
>//www.freelists.org/list/jawsscripts
>
>
>
>__________???
>
>View the list's information and change your settings at 
>//www.freelists.org/list/jawsscripts
__________�

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

Other related posts: