[jawsscripts] Share data between scripts

  • From: "Nguyen Van Dung" <dungnv1984@xxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Mon, 25 Feb 2013 03:25:52 +0700

Hi all
I have some scripts and combine  them with some different eksykeys. These
scripts need to use a same data (the next script uses output of previous
script).
At the moment, I am concerring to use file to store sharee data.
Does anyone know if we can store  the shared data in the memory for my
scripts?
Thank all.
Regards,
Dung Nguyen.
-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee
Sent: Sunday, February 24, 2013 6:54 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Timing rules for JAWS scripts

Prompted by a few messages about scheduleFunction and delay()
surprises last night, I offer the following set of perhaps interesting
facts about timing in JAWS scripts:

1. ScheduleFunction() functions do not make one function interrupt
another as far as I can tell:

script test()
sayString("alpha")
scheduleFunction("test1", 0)
sayString("beta")
delay(50)
sayString("gamma")
endScript
function test1()
sayString("delta")
endFunction

will say "delta" after all the other sayStrings, because the scheduled
call will not occur until after the test() script is finished.

2. The exception (isn't there always an exception?) is for events: If
you have a delay() in a script or function, an event like
FocusChangedEvent can fire during that call. This is why delay() now
has the second parameter that you can use to prevent this.

3. Delay() can be cut short, but pause() cannot. If you press a key
while a delay() is running, it can return instantly. Not only that,
but tests I ran years ago showed that one key press will make all
further delay() calls effectively do nothing, i.e., not delay at all,
until the key buffer is cleared. Pause(), on the other hand, is always
going to cause a momentary suspension of script processing.

4. There is no function in JAWS scripting that lets you know when
something has finished speaking:

script test()
sayString("A dozen, a gross, and a score, "
+"Plus three times the square root of four, "
+"divided by seven, "
+"plus five times eleven, "
+"Equals nine squared plus zero, no more.")
scheduleFunction("test1", 20)
endScript
function test1()
sayString("Wait wait wait, um, I can't do math that fast!")
endFunction

Unless your synth is speaking fast enough to set off the kitchen smoke
detector, two seconds will be up a ways before "no more" is spoken.
test1() will be called while speech is in progress, and its message
will be queued for speaking and will speak immediately after the long
script sayString is finished. I know of no safe way to cause a
two-second delay between the end of the long sayString's speaking and
the start of another message.

By the way, I never knew who first penned that limerick, but I love
it, and it does work out mathematically. It is not my invention.


-- 
Doug Lee, Senior Accessibility Programmer
SSB BART Group - Accessibility-on-Demand
mailto:doug.lee@xxxxxxxxxxxxxxxx  http://www.ssbbartgroup.com
"While they were saying among themselves it cannot be done,
it was done." --Helen Keller
__________o?=

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: