[jawsscripts] Re: Replacing characters in a string and altering what is spoken when a window gets focus

  • From: Jamal Mazrui <empower@xxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Fri, 14 Sep 2007 08:06:04 -0400 (EDT)

If the characters to be replaced are not the same sequence but a pattern
that can be described with a regular expression, one can use the RegExp
support of the Windows script host.  The Homer script library includes
several wrappers for such operations with regular expressions.

Jamal
On Fri, 14
Sep 2007, Geoff Chapman wrote:

> Date: Fri, 14 Sep 2007 13:01:12 +1000
> From: Geoff Chapman <gch@xxxxxxxxxxxxxxxx>
> Reply-To: jawsscripts@xxxxxxxxxxxxx
> To: jawsscripts@xxxxxxxxxxxxx
> Subject: [jawsscripts] Re: Replacing characters in a string and altering
>     what is spoken when a window gets focus
>
> hi sean.
> I can't answer your second question, but the first one I learned the answer 
> too only recently.
> the function you want is called
> StringReplaceChars and there is examples of how to use it, in the alt+d 
> description part of the script manager, or in the FSDN. I just forget which 
> right now? does exactly what you want.
>
> note: from very little experience, my memory is that it replaces each 
> character separately, in the list of chars you give it in quotation marks, 
> rather than the whole phrase etc. nor does it appear the chars need any kind 
> of delimiters in that list either.
>
> There's another function called StringReplaceSubStrings, which does whole 
> phrases, i.e. chars as a group including spaces etc. very handy.
> Another handy one can be, StringStripAllBlanks, which removes tabs or spaces 
> from strings, which can be jolly handy tooo in certain situations.
> someone more intelligent than I though wil need to answer the second part of 
> your question.
>
>
>   Geoff  c.----- Original Message -----
>   From: sean.farrow
>   To: jawsscripts@xxxxxxxxxxxxx
>   Sent: Wednesday, September 12, 2007 3:24 AM
>   Subject: [jawsscripts] Replacing characters in a string and altering what 
> is spoken when a window gets focus
>
>
>   Hi:
>   I am scripting an application, and whilst looking on the screen I have 
> strings like in-play I want to replace the - character with a space. what is 
> the best way of doing this?
>   Also I need to alter wha is read when a window obtains focus. What is the 
> best way of doing this--wha variable within th focusChanged event determines 
> the focused window?
>   Chers
>   Sean.
__________ 
View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

Other related posts: