[jawsscripts] Re: HowTo, question re autoSpeaking text when continually written to screen?
- From: "Geoff Chapman" <gch@xxxxxxxxxxxxxxxx>
- To: <jawsscripts@xxxxxxxxxxxxx>
- Date: Fri, 14 Nov 2008 12:27:39 +1100
Hi james,
hmmm, interesting thought. but, I didn't.
I think the jaws compiler probably allows a few things like that through
that can trip one up eh.
----- Original Message -----
From: <james.homme@xxxxxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Friday, November 14, 2008 1:59 AM
Subject: [jawsscripts] Re: HowTo, question re autoSpeaking text when
continually written to screen?
> Hi Geoff,
> I wonder why you didn't get a compiler error even before you tried to run
> your code since the schedule function function does not take parameters.
> That is just wrong.
>
> Thanks.
>
> Jim
>
>
> James D Homme, Usability Engineering, Highmark Inc.,
> james.homme@xxxxxxxxxxxx, 412-544-1810
>
> "The difference between those who get what they wish for and those who
> don't is action. Therefore, every action you take is a complete
> success,regardless of the results." -- Jerrold Mundis
> Highmark internal only: For usability and accessibility:
> http://highwire.highmark.com/sites/iwov/hwt093/
>
>
>
> "Geoff Chapman"
> <gch@xxxxxxxxxxxx
> t.au> To
> Sent by: jawsscripts@xxxxxxxxxxxxx
> jawsscripts-bounc cc
> e@xxxxxxxxxxxxx
> Subject
> [jawsscripts] Re: HowTo, question
> 11/12/2008 11:49 re autoSpeaking text when
> AM continually written to screen?
>
>
> Please respond to
> jawsscripts@freel
> ists.org
>
>
>
>
>
>
> Hey James, thanks for the idea here man. the problem ended up being as
paul
> suggested, I was trying to use scheduleFunction to call another function
> with the parameters of the Buffer being passed to it, and this apparently
> isn't allowed, which I didn't know. I now know how to use global variables
> though, to hold information, which I never knew before eh.
>
> That SayHighlightedText and SayNonHighlightedText functions though, as you
> mention, I must look into those some more, re what auto speaks and what
> doesn't when etc. In my ITunes cludgeys, I'm using NewTextEvent quite a
bit
> to yell out things of certain colors, because setting them as custom
> highlight colors doesn't seem to quite have the same effect as hardCoding
> them in NewTextEvent. which is kinda interesting.
>
> Thanks again for your willingness to input to my issues James.
>
> Geoff c.suggest From: <james.homme@xxxxxxxxxxxx>
> To: <jawsscripts@xxxxxxxxxxxxx>
> Sent: Wednesday, November 12, 2008 11:26 PM
> Subject: [jawsscripts] Re: HowTo, question re autoSpeaking text when
> continually written to screen?
>
>
> > Hi Geoff,
> > Without seeing your actual code, I wonder if you should only call the
> > default new text event if the buffer does not contain your text. I'm
> > thinking that maybe when you call the default new text event that it may
> be
> > speaking again because it is highlighted.
> >
> > Thanks.
> >
> > Jim
> >
> > James D Homme, Usability Engineering, Highmark Inc.,
> > james.homme@xxxxxxxxxxxx, 412-544-1810
> >
> > "The difference between those who get what they wish for and those who
> > don't is action. Therefore, every action you take is a complete
> > success,regardless of the results." -- Jerrold Mundis
> > Highmark internal only: For usability and accessibility:
> > http://highwire.highmark.com/sites/iwov/hwt093/
> >
> >
> >
> > "Geoff Chapman"
> > <gch@xxxxxxxxxxxx
> > t.au>
> To
> > Sent by: jawsscripts@xxxxxxxxxxxxx
> > jawsscripts-bounc
> cc
> > e@xxxxxxxxxxxxx
> >
> Subject
> > [jawsscripts] HowTo, question re
> > 11/12/2008 01:23 autoSpeaking text when
continually
> > AM written to screen?
> >
> >
> > Please respond to
> > jawsscripts@freel
> > ists.org
> >
> >
> >
> >
> >
> >
> > Gals/Guys, look I'm afraid I'm really pretty green novice at Scripting,
> and
> > only do it from time to time on any kind of serious level.
> > Yeah I know, <groan.)
> > and haven't done it for about a year now, but I do
> > have to jump into a new stage of a project now, and need to get some
> skills
> > up again on this.
> > But this is a relatively generic type question I guess.
> > But in a situation where I've got text I want spoken that gets written
to
> > the screen, but gets sometimes reWritten like pretty constantly, because
> I
> > know NewTextEvent gets called an awful lot,
> > to the point that jaws speaks my text capture multiple times when I only
> > want it spoken once, I've been wondering how to go about best ways of
> > addressing this.
> > I've been to date trying to use
> > just a straightUp call in a copy of NewTextEvent in my app script file,
> > looking for the text in the buffer, of any case,
> > and telling it to speak if present. like this:
> >
> > NewTextEvent (with all it's normal parameters)
> >
> > var
> >
> > string sCaseLow
> >
> > let SCaseLow = StringLower (buffer)
> >
> > if StringContains (SCaseLow "My Text to Auto Speak") then
> >
> > SayString (SCaseLow)
> >
> > EndIf
> >
> > ; Call Default NewTextVersion
> >
> > NewTextEvent (with all it's funky parameters without their identifiers)
> >
> > EndFunction
> >
> > Now this does work, But of course this means it's spoken as often as it
> > gets picked up when written to the screen, and/or whilst the screen is
> > stabalizing I guess.
> >
> > So if I wanted to eliminate this multi speaking, I thought I could maybe
> > use ScheduleFunction to facilitate this, and put in a relevant delay
such
> > that it might let a great deal of the rewrites through, without trying
to
> > speak them.
> > now this does work, in that my scheduleFunction is called when it sees
> the
> > text I'm looking for appear in the NewTextEvent buffer, Because just
> using
> > a simple SayString in the function I'm scheduling,
> > does speak, and thus lets me know that for sure.
> > but now, I can't actualy get the scheduled function I'm calling
> > to speak the text that I want spoken, and that was the cause of it being
> > triggered,
> > in the first place!
> > it claims there's nothing in it. my logic is obviously skewed somewhere.
> >
> >
> > this is what I got so far:
> >
> > NewTextEvent (with all it's normal parameters)
> >
> > var
> >
> > string sCaseLow
> >
> > let SCaseLow = StringLower (buffer)
> >
> >
> > if StringContains (SCaseLow, "Text I want Spoken") then
> >
> >
> >
> > ScheduleFunction ("SayToMe", 4)
> >
> >
> >
> > Endif
> >
> >
> > ; Call Default NewTextEvent etc.
> >
> > EndFunction
> >
> >
> > Then in the SayToMe function, I've got this:
> >
> > Function SayToMe (string Buffer)
> >
> >
> >
> > Var
> >
> >
> >
> > String sCaseLow
> >
> >
> >
> > ;let sCaseLow = StringLower (Buffer)
> >
> >
> >
> > SayString (SCaseLow)
> >
> >
> >
> > if (sCaseLow == "") then
> >
> >
> >
> > SayString ("nothing in it")
> >
> >
> >
> > EndIf
> >
> >
> >
> > SayString ("SayToMe called")
> >
> >
> >
> > EndFunction
> >
> >
> >
> > and the "nothing in it," text is spoken always, along with the SayToMe
> > called SayString, when my required text appears in the buffer.
> >
> >
> >
> > Now I confess I'm afraid I'm still so Green as to not reeeeally
> understand
> > exactly how the parameters in the actual top of functionNames, are meant
> to
> > work.
> >
> > As compared with those local variables one defines after the, var, sign
> in
> > functions themselves.
> >
> > I'd say this is where my problem's lying, but, could anyone shed any
> light
> > on perhaps what I am doing wrong here?
> >
> > be much appreciated if possible?
> >
> >
> >
> > Thanks so much.
> >
> >
> >
> > Geoff c.
> >
> >
> >
> >
> >
> >
> >
> > __________
> > 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
> >
>
> __________
> 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
>
__________
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: