[jawsscripts] Re: Getting text in an edit field

  • From: "jaws tech" <jawsmaster@xxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Wed, 21 May 2008 13:51:11 -0400

Thanks, I will try that and I'm pretty sure that will work.  I need to find
some documentation
on the MSAA object model so that I can learn about methods such as the
accValue one.
If you know of any simple documentation for MSAA or a good place to start
please let me know.
I tried sendmessage but I came to the conclusion that when the sendmessage
call returns
something via the Lparam variable, then it can't be used in JAWS.  There
doesn't seem to be
a mechanism to capture this information.  When Lparam doesn't play a role in
the sendmessage call, then it seems to do OK in JAWS. Others more
experienced with using
SendMessage may have more to say about this but that's my assessment.


On 5/21/08, Paul Magill <magills@xxxxxxxxxxx> wrote:
>
> 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
>
>


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

Other related posts: