[jawsscripts] Re: How to read bottom line of string only?

  • From: Jackie McBride <abletec@xxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Wed, 19 May 2010 08:10:35 -0700

FSDN is a scripter's best friend. (sometimes, at least when the
documentation is instructive) lol. Actually it's a very handy
reference tool.

On 5/18/10, Geoff Chapman <gch@xxxxxxxxxxxxxxxx> wrote:
> Thanks a lot Jackie for this eh.  Yes checking this out in fsdn indicated
> the -1 retreaving the last segment from the right. that's a jolly handy
> little edition eh.
>
> Thanks again.
> Geoff.
> ----- Original Message -----
> From: "Jackie McBride" <abletec@xxxxxxxxx>
> To: <jawsscripts@xxxxxxxxxxxxx>
> Sent: Wednesday, May 19, 2010 2:16 PM
> Subject: [jawsscripts] Re: How to read bottom line of string only?
>
>
>> Geoff:
>>
>> StringSsegment may well do what you're looking for. The key is
>> determining what delimits these text lines. If it is, as u suggest, a
>> newline character, then something like the following should work:
>> String Function RetrieveCall()
>> var
>> string S-caller,
>> String S-text
>>
>> let S-text = GetWindowText(GetCurrentWindow(), 0)
>> let S_caller = stringSegment(S-text, "\n", -1) ;retrieves last segment
>>
>> Of course the GetCurrentWindow() was just a W A G, but the
>> StringSegment portion is accurate.
>>
>> On 5/18/10, Soronel Haetir <soronel.haetir@xxxxxxxxx> wrote:
>>> Windows controls generally need a \r\n pair. (certainly the edit and
>>> rich text box controls do).
>>>
>>> StringSegment() looks like it could do what you're after (basically
>>> the last line of a multi-line string, right?).
>>>
>>> On 5/18/10, Geoff Chapman <gch@xxxxxxxxxxxxxxxx> wrote:
>>>> HI Scripters.  I wish to work out, from a bunch of text in a frame, how
>>>> I
>>>> can string monipulate such that I can read only the bottom line of a
>>>> stack,
>>>> which in this case will be the last call put on Hold, and which the
>>>> keyboard
>>>> focus will thus operate on when HoldRetreave is pressed from within this
>>>> telephony interface application I'm scripting for?  I know it must
>>>> probly
>>>> have something to do with grabbing the whole  MultiLine string of the
>>>> text
>>>> in the frame, and somehow getting jaws to search from the right hand end
>>>> of
>>>> the string, backwards along the bottom line, until it reached a
>>>> newLine/Carriage return character, then chopping everything from their
>>>> to
>>>> the left, returning the remainder botttom line? but, I'm just a bit
>>>> fogged
>>>> as to how to exactly code this type of funcionality?  Could anyone steer
>>>> me
>>>> on the right path here? and, is it a "\r" or "\n
>>>>  that I'd be looking for here? and is it double backslash that you have
>>>> to
>>>> enclose in quotes when looking for one of these? ive just forgotten
>>>> somehow.
>>>> thanks so much for any pointers/info.
>>>>
>>>> geoff
>>>>
>>>> __________�
>>>>
>>>> View the list's information and change your settings at
>>>> //www.freelists.org/list/jawsscripts
>>>>
>>>>
>>>
>>>
>>> --
>>> Soronel Haetir
>>> soronel.haetir@xxxxxxxxx
>>> __________�
>>>
>>> View the list's information and change your settings at
>>> //www.freelists.org/list/jawsscripts
>>>
>>>
>>
>>
>> --
>> Change the world--1 deed at a time
>> Jackie McBride
>> www.abletec.serverheaven.net
>> Please join me Saturday, 11/7, on my walk against breast cancer by
>> making a donation at:
>> http://main.acsevents.org/goto/larkspur>
>> __________�
>>
>> 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
>
>


-- 
Change the world--1 deed at a time
Jackie McBride
www.abletec.serverheaven.net
Please join me Saturday, 11/7, on my walk against breast cancer by
making a donation at:
http://main.acsevents.org/goto/larkspur>
__________�

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

Other related posts: