[jawsscripts] Re: Getting text in an edit field

  • From: "Paul Magill" <magills@xxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Wed, 21 May 2008 21:17:31 +1000

Hi,

I dont believe that SendMessage can do what you want, So try the method in
the below script...

This depends on MSAA being present & working correctly.

The sample methods show obtaining the object from either the position of the
currently active cursor, the focus, or at a point specified by x y pixel
location respectively.

If using GetObjectAtPoint, which allows for obtaining an object from a
window in which there is no cursor, then a suitable point can be obtained
given the windows handle.

GetWindowRect (Hwnd, Left, Right, Top, bottom)

GetObjectAtPoint (childId, (Left + Right) / 2, (Top + Bottom) / 2)


I tested each of the functions in Notepad's text window using Jaws version 8
under XP, & the text that had scrolled off the bottom was also returned.

Acknowledging Doug Lee for explaining this method on list some time ago.

Hope this helps.

Regards,
Paul from Aust

Script TestObjects () ; shift+F9

var

object o,

int childId

let o = GetCurrentObject(childId)

;let o = GetFocusObject (childId)

;let o = GetObjectAtPoint (childId, 200, 300)

SayString ("value = ")

SayString (o.accValue (childId))

EndScript


----- Original Message ----- 
From: "jaws tech" <jawsmaster@xxxxxxxxx>

This is what I have done in the past.  However, I am essentially scraping a
screen that
has 8-10 of these edit fields and that method has been problematic at best.
There are timing
issues and it takes quite a bit of time.  I am storing the text from each
field in a variable for
subsequent input into another app.   I think a method involving SendMessage
or
something like this would be more reliable and quick.  However, I'm not sure
how to use this
method.  Documentation for Sendmessage is suprisingly sparse....

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

Other related posts: