[jawsscripts] Help with a Problem Please

  • From: Steve Matzura <number6@xxxxxxxxxxxxx>
  • To: jawsscripts <jawsscripts@xxxxxxxxxxxxx>
  • Date: Fri, 07 May 2010 08:00:26 -0400

I have an application which is essentially a data entry form with lots
of various controls--combo boxes, checkboxes, raw text edit fields,
you know the drill--but because of the physical placement on-screen,
JAWS never speaks the field name prompts, only the data entry areas.
So I wrote this function, keyed on the TAB key, which I will include
at the end of this message.  I learned, through the use of the Home
Row Utility, that the window just to the left of the currently focused
window (where the cursor is, ready for input) contains the field name.
It shows up and displays 100 per cent consistently when I set the HRU
F3 function to Type and Text.  I can find a field, go into Home Row
mode, back-bat once, and hear the field name.  Hence the code below.
However, in real life what happens is that it works for the first
control only, then stops working for the rest of the fields on the
screen.  Oddly enough, when using back-TAB, it only works on the last
item in sequence, which is, once again, the first field on the screen.
Frankly, I'm surprised it has any affect at all, since the script is
not designed to trap the back-TAB key at all.

Any suggestions gratefully accepted.

Oh by the way, there's a lovely area on-screen that, for every field
on which you focus for data entry, displays a long help text as to
what that field is, the kind of data you should be typing into it,
etc.  Problem is, it doesn't show up anywhere (that I can find) in the
hierarchy of windows, it acts like an HTML window in Internet
Explorer, and once focused on it, pressing TAB will set you back to
the beginning of the data entry screen, first field.  I'm still
puzzling this one out, but anyway, here's the function for reading the
field name.

Script ReadFieldName ()

var
    handle hwnd

{TAB} ; Pass the TAB key through to the app.

let hwnd = GetCurrentWindow () ; where the focus is.

if GetWindowType (hwnd) != WT_TREEVIEW then

; Don't perform this function on the tree view.
; The tree view acts like a multipage dialog box and speaks well ;
without scripted assistance.

    let hwnd = GetPriorWindow (hwnd) 
; Move left one window to where the field name is.
    SayWindowTypeAndText (hwnd) ; Speak it.
EndIf
    
EndScript
__________�

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

Other related posts: