[jawsscripts] Re: Schedule events

  • From: "Nguyen Van Dung" <dungnv1984@xxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Sun, 24 Feb 2013 17:11:57 +0700

Hi
I have a same problem related to delay  event. Could you please take a look
it at and give me any idea?
My context is: I need to say 2 message and have a delay between them, so I
created a snip of code as below:
-------
Say(message1, OT_STRING)
DELAY(10)
Say(message1, OT_STRING)
-----
It seems to delay function starts counting time after message1 is started
spoken, not after message 1 is spoken completely. So if the message 1 is
long, then delay function does not take any effective.
I need  a delay period between finishing saying message 1 and starting
saying message 2.
Do you have any idea for my case?
Thank so much.
Regards,
Dung Nguyen.

-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Jim Snowbarger
Sent: Sunday, February 24, 2013 11:22 AM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Schedule events

Trivia Question, in the folowing snippet of code, which message do you think
will get spoken first?  Hello?  or Goodbye.
The winner will recieve an all expenses paid trip to nowhere, and a cracked
version of NVDA.
Script Test ()

; start this from the keyboard

ScheduleFunction ("HelpTest", 1)

delay(50)

SayString ("goodbye")

EndScript

 

Function helpTest ()

SayString ("hello")

EndFunction



The answer?  Are you sure you want to know? You're not going to like this.



Wrong.  Good bye is spoken first, because the jaws script engine is busy
processing the delay statement when the scheduled function comes due.  So,
the scheduled event must wait for the main script to finish, even though it
is due sooner.





__________�

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

Other related posts: