[jawsscripts] Re: Screen Area Reading

  • From: "Donald Marang" <donald.marang@xxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Thu, 10 Sep 2009 12:29:56 -0400

You need to probe the application using the Home Row Utility or the BX 
Toolbox.  Try to see if the developer assigned a unique Control ID.  If they 
did, you should be able to move to that control using:
Const
    CID_EDIT = 1053 ; The Control ID found using BX or Home Row

Script MoveToEdit ()
Var
    Handle hEditBox

Let hEditBox = FindDescendentWindow (GetAppMainWindow (GetCurrentWindow ()), 
CID_EDIT)
If hEditBox Then
    SetFocus (hEditBox)
Else
       SayString ("Edit box not found!")
EndIf
EndScript

There are other FindWindow and MoveToWindow functions that might work better 
in some circumstances,
I had a case where the above method failed, but a very similar method using 
statements like below works every time:
If MoveToControl (GetAppMainWindow (GetCurrentWindow ()), CID_EDIT) Then
    LeftMouseButton ()
Else
    SayString ("Edit box not found!")
EndIf

some of which depend on different information that is unique.  Watch out! 
The information not only has to be unique, it must be the same every time 
the program is run.  Some programming environments like to dynamically 
assign Control IDs the same number as the window handle, which is assigned 
by Windows at run time.  If this is the case, you need to find another way 
to identify the window.

I hope I didn't make any typos above, I usually allow Script Manager to do 
most of the typing!

Don Marang


----- Original Message ----- 
From: "Steven Hicks (HICKSSM)" <Steven.HicksSM@xxxxxxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Thursday, September 10, 2009 8:11 AM
Subject: [jawsscripts] Screen Area Reading


> Hi friends,
> not sure if someone can help me with this query or not but I have an edit 
> box that appears on the screen in an application called quetzal that we 
> use.
> It is not always in the same place unfortunately but I would like to try 
> to find a way to read it quickly if possible, maybe with a shortcut.
> Does anyone know if this is possible please?
> I suspect that it may be a case of searching for the object i.d. of the 
> edit box or something then moving  to it?
>
>
> -----------------------------------------------------------------------------------------
> The information in this e-mail and any attachments is
> confidential and is intended for the attention and use of the
> named addressee(s).  It  must not be disclosed to any other
> person  without our authority.  If you are not the intended
> recipient, or a person responsible for delivering it to
> the intended recipient or are aware that this e-mail has been
> sent to you in error, you are not authorised to and must not
> disclose, copy, distribute, or retain this message or any part of it.
>
> We sweep all outgoing messages for the presence of computer
> viruses. However, we cannot accept any responsibility for any
> loss or damage to your systems due to viruses or malicious
> code not detected.
>
> The statements and opinions expressed in this message are
> those of the author and do not necessarily reflect those of the
> organisations within the Cornwall & Isles of Scilly Health
> Community.
>
> This email may be disclosed under the Freedom of Information
> Act 2000 or the Environmental Information Regulations 2004.
> -----------------------------------------------------------------------------------------
>
> __________
> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>
> View the list's information and change your settings at
> //www.freelists.org/list/jawsscripts
> 

__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

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

Other related posts: