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

  • From: Csaba Godo <arpadhazi68.jawsul@xxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Sun, 5 Jan 2020 21:15:09 +0100

Tony, it does not work in this case. I have to use heavy regexp searches 
(in many times more windows are opened where I have to search), so I 
can't change selections, cursor positions. I hope somebody has perhaps 
an idea how to do it. If not I will have to write a regfree COM dll 
which will do the task. But it is the last thing I want to do.


2020. 01. 05. 20:13 keltezéssel, tonyhspeaks@xxxxxxxxx írta:

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

__________�

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

Other related posts: