[jawsscripts] Re: How to capture text between two points in an editor?
- From: "Homme, James" <james.homme@xxxxxxxxxxxx>
- To: "jawsscripts@xxxxxxxxxxxxx" <jawsscripts@xxxxxxxxxxxxx>
- Date: Thu, 30 Jul 2009 09:59:00 -0400
Hi Brian,
Did you attempt to re-class the window?
Jim
----------
Jim Homme
Usability Services
412-544-1810
james.homme@xxxxxxxxxxxx
"You can do anything you want to if you put your mind to it" -- Jim Homme Sr.
-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Bryan Garaventa
Sent: Wednesday, July 29, 2009 5:58 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: How to capture text between two points in an editor?
Nope, the window type is unrecognized, has no DOM, and crashes if you try to
use MSAA to access it.
----- Original Message -----
From: "Chad Foster" <chad.foster@xxxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Wednesday, July 29, 2009 2:14 PM
Subject: [jawsscripts] Re: How to capture text between two points in an
editor?
> This text area does not lie in a rich edit field does it? If using a
> rich edit text field, or a Word document, or any other DOM-supported
> program for that matter, you could use the back-end object model to
> glean the text.
>
> On 7/29/09, Bryan Garaventa <bgaraventa11@xxxxxxxxxxxxxx> wrote:
>> I tried this a bit last night, but ran into a similar problem, since the
>> rectangle doesn't remain proportional as more items are selected line by
>> line and word by word, etc.
>>
>> The GetTextBetween function appears to only return the text at the same
>> horizontal position, so only one line at a time gets announced instead of
>> the whole string from beginning to end.
>>
>> Perhaps a recursive function would do the trick, where each line is
>> recorded
>> into an array string to record the leftEdge and rightEdge coordinates,
>> and
>> when the horizontal position changes, a new array value can be added to
>> the
>> string, which can then be parsed later to get the variable selected text
>> line by line using GetTextBetween, then string all of them together to
>> make
>> a complete string. I think, I'll have to experiment a bit later tonight
>> to
>> see if this is possible.
>>
>> Too bad there doesn't appear to be a recursive function to get all of the
>> text from the top-left position through the bottom-right position in the
>> same manner as a frame is created.
>>
>> ----- Original Message -----
>> From: "Martin Slack" <m.g.slack@xxxxxxxxxxxx>
>> To: <jawsscripts@xxxxxxxxxxxxx>
>> Sent: Wednesday, July 29, 2009 12:38 PM
>> Subject: [jawsscripts] Re: How to capture text between two points in an
>> editor?
>>
>>
>>> Have you tried the GetTextInRect function, adding offsets if necessary
>>> to
>>> slightly increase the size of your bounding rectangle?
>>>
>>> Martin
>>>
>>>
>>>
>>> ----- Original Message -----
>>> From: "Bryan Garaventa" <bgaraventa11@xxxxxxxxxxxxxx>
>>> To: <jawsscripts@xxxxxxxxxxxxx>
>>> Sent: Wednesday, July 29, 2009 7:29 PM
>>> Subject: [jawsscripts] How to capture text between two points in an
>>> editor?
>>>
>>>
>>> This probably sounds like a stupid question, but here it goes...
>>> I've got the x and y coordinance of two specific points within an
>>> editor,
>>> the x and y for the beginning of the text, and the x and y for the end
>>> of
>>> the text.
>>> Capturing the text between the points within a rectangle doesn't work,
>>> because if the selected text is all of one line, and part of another
>>> line,
>>> the vertical position doesn't encompass all of the selected text.
>>>
>>> Plus this selected text isn't recognized by the GetSelectedText
>>> function,
>>> so
>>> in case you're wondering, this is why I'm trying to write a workaround.
>>>
>>> Hopefully I'm missing a function specifically designed for this purpose,
>>> but
>>> I haven't had much luck locating it. Any ideas?
>>>
>>> Thanks,
>>> Bryan
>>> __________
>>> Visit and contribute to The JAWS Script Repository
>>> http://jawsscripts.com
>>>
>>> View the list's information and change your settings at
>>> http://www.freelists.org/list/jawsscripts
>>>
>>>
>>>
>>> --------------------------------------------------------------------------------
>>>
>>>
>>>
>>> No virus found in this incoming message.
>>> Checked by AVG - www.avg.com
>>> Version: 8.5.392 / Virus Database: 270.13.35/2270 - Release Date:
>>> 07/29/09
>>> 06:12:00
>>>
>>> __________
>>> Visit and contribute to The JAWS Script Repository
>>> http://jawsscripts.com
>>>
>>> View the list's information and change your settings at
>>> http://www.freelists.org/list/jawsscripts
>>>
>>
>> __________
>> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>>
>> View the list's information and change your settings at
>> http://www.freelists.org/list/jawsscripts
>>
>>
>
>
> --
> Chad Foster
> Access Technology Solutions
> Leveling The Playing Field Through Technology
> http://www.GO-ATS.net
> __________
> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>
> View the list's information and change your settings at
> http://www.freelists.org/list/jawsscripts
>
__________
Visit and contribute to The JAWS Script Repository http://jawsscripts.com
View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts
This e-mail and any attachments to it are confidential and are intended solely
for use of the individual or entity to whom they are addressed. If you have
received this e-mail in error, please notify the sender immediately and then
delete it. If you are not the intended recipient, you must not keep, use,
disclose, copy or distribute this e-mail without the author's prior permission.
The views expressed in this e-mail message do not necessarily represent the
views of Highmark Inc., its subsidiaries, or affiliates.
__________
Visit and contribute to The JAWS Script Repository http://jawsscripts.com
View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts
Other related posts: