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

  • From: tonyhspeaks@xxxxxxxxx
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Sun, 5 Jan 2020 14:13:10 -0500

In cases like this, I select all The text and then Use CopyToClipboard  with 
GetSelectedText As the parameter. Maybe it isn't the best solution, But it 
works reliably.                                     

Sent from my mobile device 

On Jan 5, 2020, at 1:29 PM, Csaba Godo <arpadhazi68.jawsul@xxxxxxxxx> wrote:

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

__________�

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

Other related posts: