[jawsscripts] How to get the contained thext of an edit control?

  • From: Csaba Godo <arpadhazi68.jawsul@xxxxxxxxx>
  • To: JAWSScripts List <jawsscripts@xxxxxxxxxxxxx>
  • Date: Sun, 5 Jan 2020 19:28:58 +0100

Hi, experienced scripters!


I write a script where I have to query the text contained in a multiline 
edit editbox (type WT_EDIT). Because the SendMessage function in JAWS 
Script limited only to pass integers as param, I can't use this function 
with WM_GETTEXT message, which would be the best solution. I tried the 
method found in Jamal Mazui's old homer script set, which uses MSAA 
retrieve control's text as follows:

string Function EditGetText (optional handle Controlhandle)
var
        int i,

        Object o,
        string sReturn

        InitHandle (ControlHandle, GetFocus ())

        o = GetObjectFromEvent (ControlHandle, msaa_OBJID_CLIENT, 1, i)
        sReturn = o.AccValue
        NullObject (o)
        Return sReturn
EndFunction; EditGetText

The problem with this solution, that it returns only the first 4096 
characters of the contained thext. If it is longer, truncates it.  The 
solution should work not only in case of focused controls but with 
hidden windows, too.  In many times my script should be able to search 
in text of  a second window which is covered by other windows.

Does have somebody idea how to get the full text of the control?


Tanks in advance for every ideas!

Cheers,

Csaba
__________�

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

Other related posts: