[jawsscripts] Re: speech truncation
- From: "Geoff Chapman" <gch@xxxxxxxxxxxxxxxx>
- To: <jawsscripts@xxxxxxxxxxxxx>
- Date: Tue, 14 Oct 2008 02:15:10 +1000
Hi.
Look I'm sure no expert on this, and it's pathetic that I can't remember as
much as this post is going to reveal I can't, but since noone else is biting
yet today for you, thought I'd chuck in my 1.5 cents worth on this which
might twig things in your mind which might give you some clues to
resolution.
I utilized scheduleFunction heaps in my last lot of code, done over a year
ago now, but I've now forgotten exactly how it helped me, though I know it
certainly did! but what happens if you juggle the numbers as the second
parameter of the ScheduleFunction syntax. i.e. you've got a zero there now,
and I know someone here indicated that this value would be perhaps helpful
for something, ... i know this is as vague as, but, have you tried putting a
1 in there, or a 2, 3, etc, and seeing how that effects things?
As i say, I just can't remember now myself, exactly how that function works,
and how it does what it does, but I found that I never had to use
UnScheduleFunction when i used it, and, now I can't even say why that was!
I know it just did help significantly with timing issues that I had to get
around, screenSettling type stuff, where I had to wait until a frame, for
example, was populated with information, before getting a function to grab
and read it's info.
I hope this post will generate a response that might shed a bit more light
on it's usage, and how it exactly differs from using a delay function call.
as I've forgotten exactly myself.
Message -----
From: "Cearbhall O Meadhra" <cearbhall.omeadhra@xxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Monday, October 13, 2008 5:58 PM
Subject: [jawsscripts] Re: speech truncation
> Dear David,
>
> I have tried some test runs and now I can see that when the subroutine to
> read the page is called from another script, the say all function is being
> interrupted as the control is handed back to the calling script after the
> first sentence is spoken. When only one call is made, the Say all picks up
> and continues until the full page is spoken. If, however, a second call is
> made to the page reading function, the Say All is permanently interrupted.
>
> I tried stopping the return to the calling script by means of the
> ScheduleEvent function but I cannot tell if this is working because I get
> absolutely no response from the schedule event function call. I cannot
find
> any details on how best to use this function and so I don't know if I am
> using it inappropriately.
>
> I tried a simple call as follows:
>
>
> Script testSchedule ()
> ScheduleFunction ("testMessage ", 0)
>
> EndScript
>
> Void Function testMessage ()
> SayString ("say all equals")
> EndFunction
>
>
> This delivered total silence!
>
>
> All the best,
>
>
> Cearbhall
>
> "Good design enables - Bad design disables"
>
> Tel: 01-2864623 Mob: 087 9922227 Em: cearbhall.omeadhra@xxxxxxxxxx
>
>
> -----Original Message-----
> From: jawsscripts-bounce@xxxxxxxxxxxxx
> [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of David Farough
> Sent: 10 October 2008 22:08
> To: jawsscripts@xxxxxxxxxxxxx
> Subject: [jawsscripts] Re: speech truncation
>
> Hi Cearbhal:
>
> I can see why you might be confused about my suggestion of defining a
> SayAllStoppedEvent. This is not something that you call specifically from
> your scripts. This is in fact an event that Jaws will call when the
SayAll
> stops for whatever reason.
>
> When you see the word Event in a function name, this is an indication that
> the function in question will be run or called when a particular thing
> happens. Some other event processing functions are: NewTextEvent (occurs
> when new text is written to the screen), KeyPressedEvent (occurs when a
key
> is pressed).
>
> I was suggesting that you define your own SayAllStoppedEvent in your
> scripts. This would allow you to change the value of a global variable
when
> the sayAll stops.
>
> Then in another function that you write, you can check on the value of
this
> variable.
>
> I suspect that your problem is happening because the delay within your
while
> loop is not working the way you expect it to. Maybe your loop is trying
to
> run the virtualread script again while the sayall is in progress.
>
> David Farough
> Application Accessibility Coordinator/coordonateur de l'accessibilité
> Information Technology Services Directorate / Direction des services
> d'information technologiques Public Service Commission / Commission de la
> fonction publique Email / Courriel: David.Farough@xxxxxxxxxxxxx
> Tel. / Tél: (613) 992-2779
>
> >>> "Cearbhall O Meadhra" <cearbhall.omeadhra@xxxxxx> 03:59 pm Friday,
> October 10, 2008 >>>
> Dear David,
>
> I have puzzled over this recommendation of yours for the past week. I
> believe you have put your finger on something that will help but I just
> cannot see it. Please forgive me if I ask for some more clarification!
>
> The problem is that the "say All" function is not completing. In other
> words, the Say all is stopping before it should do so. Why, then, would I
> call a function that stops it?
>
> I like your suggestion about the scheduled event instead of the while
loop.
> I will certainly experiment with that and report back as to how it works
> out. As far as I can see, the scheduled event is to be delayed before
> execution. Does that mean that the first run of the event must take place
> before this routine is called?
>
>
> I really appreciate your help with this.
> All the best,
>
>
> Cearbhall
>
> "Good design enables - Bad design disables"
>
> Tel: 01-2864623 Mob: 087 9922227 Em: cearbhall.omeadhra@xxxxxxxxxx
>
>
> -----Original Message-----
> From: jawsscripts-bounce@xxxxxxxxxxxxx
> [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of David Farough
> Sent: 06 October 2008 18:21
> To: jawsscripts@xxxxxxxxxxxxx
> Subject: [jawsscripts] Re: speech truncation
>
> Hi Cearbhal:
>
> I preface this by saying that I have never used the SayAllStoppedEvent so
I
> do not have any first hand information to share.
>
> However the following can be found in the FSDN document.
>
> Function: SayAllStoppedEvent
> Description
> User-defined code can be added to an overwritten version of this function
to
> run every time SayAll stops.
>
> Returns
> Type: Void
>
>
> Parameters
> No Parameters
>
> Version
> This function is available in the following releases:
>
> PAC Mate 1.10 and later
> JAWS 4.51 and later
>
> I was thinking that you might want to set a global variable in this event
> that indicates that the SayAll was finished.
>
> You may need to get creative with regard to your looping structure.
>
> I suspect that trying to perform the script within the loop is causing
> problems.
>
> Perhaps you could use ScheduleFunction with an appropriate amount of time
to
> call a function that you write which would perform the read script again.
> Maybe in this function you would check the value of the global variable
> which you set in the SayAllStoppedEvent if true, then read again
otherwise
> call a function that will wait a period of time and check again.
>
> Here is the info for ScheduleFunction I think that this might serve you
> better than Delay.
>
> You may need to rework your code a bit and remove the loop in the script.
>
> Function: ScheduleFunction
> Description
> Runs a user defined function in a set period of time. Useful when you want
> to perform a task and then check on the results at a later time.
> Once this function is used, you can call UnScheduleFunction to cause the
> user-defined event not to run.
>
> Returns
> Type: Int
> Description: An ID that can be used to call UnScheduleFunction. If 0 is
> returned, then the timer was not successfully set.
>
>
> Parameters
> Param 1:
> Type: String
> Description: Name of function to be executed.
> Include: Required
>
>
> Param 2:
> Type: Int
> Description: Amount of time to elapse before the function is executed.
> Time is measured in tenths of a second. A value of 10 is one second.
> Include: Required
>
>
> Version
> This function is available in the following releases:
>
> PAC Mate 1.10 and later
> JAWS 4.51 and later
> Magic 10.5 and later
>
> I have done some looking and found an example of coding for the
> SayAllStoppedEvent taken from Outlook2007.jss.
>
> Here is the example code.
>
> Void Function SayAllStoppedEvent()
> If gbWordIsWindowOwner then
> if IsDocProtected()>=0 then
> QuickNavStateChange(true)
> Else
> QuickNavStateChange(false)
> EndIf
> EndIf
> default::SayAllStoppedEvent()
> EndFunction
>
> Note that the line immediately above the EndFunction explicitly calls
> the SayAllStoppedEvent from the Default.jsb
>
>
> David Farough
> Application Accessibility Coordinator/coordonateur de l'accessibilité
> Information Technology Services Directorate /
> Direction des services d'information technologiques
> Public Service Commission / Commission de la fonction publique
> Email / Courriel: David.Farough@xxxxxxxxxxxxx
> Tel. / Tél: (613) 992-2779
>
> >>> "Cearbhall O Meadhra" <cearbhall.omeadhra@xxxxxx> 05:56 pm Friday,
> October 03, 2008 >>>
> Dear David,
>
> I tried your suggestion of using a pause following the getWindowText
> and
> after the ExitUserbuffer statement. This caused an immediate
> improvement in
> the flow of text output by the script "VirtuaReadMode" which functions
> as a
> single read of one page. The text flows now without any hesitation so
> I
> think you have definitely improved that part of the problem, thanks!
>
> The "eBookReadContinuous" script repeatedly calls the
> "VirtuaReadMode"
> to
> generate a continuous flow of text and move from page to page. Here
> the
> script is moving from page to page correctly but the text being output
> from
> the "VirtuaReadMode" is still being truncated quite severely.
>
> It appears to me that the looping system is interfering in the
> background
> somehow. I have increased the delay before launching the call to
> repeat
> the
> "VirtuaReadMode" but this only increases the silence between runs and
> does
> not stop the truncation.
>
> What is the purpose of the SayAllStoppedEvent?
>
> All the best,
>
>
> Cearbhall
>
> "Good design enables - Bad design disables"
>
> Tel: 01-2864623 Mob: 087 9922227 Em: cearbhall.omeadhra@xxxxxxxxxx
>
>
>
> 100 Years Merits a Celebration!
> http://www.psc-cfp.gc.ca/100/index-eng.htm
> 100 ans, ça mérite une célébration!
> http://www.psc-cfp.gc.ca/100/index-fra.htm
>
> __________
> 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
>
>
> 100 Years Merits a Celebration!
> http://www.psc-cfp.gc.ca/100/index-eng.htm
> 100 ans, ça mérite une célébration!
> http://www.psc-cfp.gc.ca/100/index-fra.htm
>
> __________
> 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
- Follow-Ups:
- [jawsscripts] Re: speech truncation
- From: Doug Lee
- References:
- [jawsscripts] Re: speech truncation
- From: Cearbhall O Meadhra
- [jawsscripts] Re: speech truncation
- From: David Farough
- [jawsscripts] Re: speech truncation
- From: Cearbhall O Meadhra
- [jawsscripts] Re: speech truncation
- From: David Farough
- [jawsscripts] Re: speech truncation
- From: Cearbhall O Meadhra
- [jawsscripts] Re: speech truncation
- From: David Farough
- [jawsscripts] Re: speech truncation
- From: Cearbhall O Meadhra
Other related posts:
- » [jawsscripts] Re: speech truncation
- » [jawsscripts] Re: speech truncation
- » [jawsscripts] Re: speech truncation
- » [jawsscripts] Re: speech truncation
- » [jawsscripts] Re: speech truncation
- » [jawsscripts] Re: speech truncation
- » [jawsscripts] Re: speech truncation
- » [jawsscripts] Re: speech truncation
- » [jawsscripts] Re: speech truncation
- » [jawsscripts] Re: speech truncation
- » [jawsscripts] Re: speech truncation
- » [jawsscripts] Re: speech truncation
- » [jawsscripts] Re: speech truncation
- » [jawsscripts] Re: speech truncation
- » [jawsscripts] Re: speech truncation
- [jawsscripts] Re: speech truncation
- From: Doug Lee
- [jawsscripts] Re: speech truncation
- From: Cearbhall O Meadhra
- [jawsscripts] Re: speech truncation
- From: David Farough
- [jawsscripts] Re: speech truncation
- From: Cearbhall O Meadhra
- [jawsscripts] Re: speech truncation
- From: David Farough
- [jawsscripts] Re: speech truncation
- From: Cearbhall O Meadhra
- [jawsscripts] Re: speech truncation
- From: David Farough
- [jawsscripts] Re: speech truncation
- From: Cearbhall O Meadhra