Paul, Java Access Bridge 1 had to be installed manually. Now it comes w/the JRE, but it is by default disabled. So--the cumbersome manual installation is gone--the tradeoff is u still have to enable it. On 2/25/13, Paul Bonarrigo <pjbonarrigo@xxxxxxxxx> wrote: > Question for Doug Lee or anyone else willing to answer. > Java Access Bridge, J A B 2.x.x must be enabled via the Windows > Accessibility Control Panel or executing the java app called JABswitch. > Below is an SSB Bart Group link that talks about this. > https://www.ssbbartgroup.com/blog/2012/08/30/jre-7-update-6-now-comes-bundled-with-the-java-access-bridge/ > I don't recall Java Access Bridge 1.x.x requiring that it be enabled. > Is Java Access Bridge enabling new to 2.x.x? > From: FreeLists Mailing List Manager <ecartis@xxxxxxxxxxxxx> > To: jawsscripts digest users <ecartis@xxxxxxxxxxxxx> > Sent: Sunday, February 24, 2013 11:12 PM > Subject: jawsscripts Digest V7 #46 > > jawsscripts Digest Sun, 24 Feb 2013 Volume: 07 Issue: 046 > > In This Issue: > [jawsscripts] How to use SayUsingVoice function > [jawsscripts] Re: Schedule events > [jawsscripts] Re: How to use SayUsingVoice function > [jawsscripts] Timing rules for JAWS scripts > [jawsscripts] Re: How to use SayUsingVoice function > [jawsscripts] Re: Timing rules for JAWS scripts > [jawsscripts] Re: Timing rules for JAWS scripts > [jawsscripts] Re: Timing rules for JAWS scripts > [jawsscripts] Share data between scripts > [jawsscripts] How to know a key is pressed > [jawsscripts] Re: Schedule events > [jawsscripts] Re: Timing rules for JAWS scripts > [jawsscripts] Re: Schedule events > > ---------------------------------------------------------------------- > > From: "Nguyen Van Dung" <dungnv1984@xxxxxxxxx> > Subject: [jawsscripts] How to use SayUsingVoice function > Date: Sun, 24 Feb 2013 16:52:55 +0700 > > Hello all > I need to say a message with a specific synthesizer and voice. Actually now > I am having to switch to my synthesizer and voice manually before saying my > message and switch back to default voice but I do not like this way. > I found a function: SayUsingVoice > According to fsdn book, I can use that function but I do not find any > parameter for my synthesizer and voice, so I do not know how to use it. > Does anyone know to use it? > Thank all. > Regards, > Dung Nguyen. > > -----Original Message----- > From: jawsscripts-bounce@xxxxxxxxxxxxx > [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Jackie McBride > Sent: Sunday, February 24, 2013 11:30 AM > To: jawsscripts@xxxxxxxxxxxxx > Subject: [jawsscripts] Re: Schedule events > > On 2/23/13, Jim Snowbarger <Snowman@xxxxxxxxxxxxxxxx> wrote: >> 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 >> >> > > > -- > Blame the computer--why not? It can't defend itself & occasionally > might even be the culprit > Jackie McBride > Ask Me Computer Questions at: www.pcinquirer.com > Jaws Scripting training materials: www.screenreaderscripting.com > homePage: www.brighter-vision.com > __________� > > View the list's information and change your settings at > //www.freelists.org/list/jawsscripts > > > ------------------------------ > > From: "Nguyen Van Dung" <dungnv1984@xxxxxxxxx> > Subject: [jawsscripts] Re: Schedule events > 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 > > > ------------------------------ > > From: "Paul Magill" <magills@xxxxxxxxxxx> > Subject: [jawsscripts] Re: How to use SayUsingVoice function > Date: Sun, 24 Feb 2013 22:41:06 +1100 > > Hi Dung, > > Sorry, but I think that function is not intended for what you are looking > for... > > The choice of voices that it can use, are only from the currently running > synthesiser, and are the global , keyboard, message & Jaws cursor voices as > > listed below. > > See the extract from the Freedom Scientific FSDN below... > > The constants referred to are in the HJConst.jsh file, which is in the > allUsers folder of Jaws. > > FSDN extract: > Function: SayUsingVoice > Description > Speak a string of text using a specific synthisizer voice. > > Returns > Type: Void > > > Parameters > Param 1: > Type: String > Description: Type in the constant representing the voice to be used. These > constants are defined in the file hjconst.jsh and are listed below: > VCTX_GLOBAL, VCTX_MESSAGE, VCTX_KEYBOARD, VCTX_SCREEN, VCTX_PCCURSOR, > VCTX_JAWSCURSOR > Include: Required > > > ----- Original Message ----- > From: "Nguyen Van Dung" <dungnv1984@xxxxxxxxx> > > > Hello all > I need to say a message with a specific synthesizer and voice. Actually now > > I am having to switch to my synthesizer and voice manually before saying my > > message and switch back to default voice but I do not like this way. > I found a function: SayUsingVoice > According to fsdn book, I can use that function but I do not find any > parameter for my synthesizer and voice, so I do not know how to use it. > Does anyone know to use it? > Thank all. > Regards, > Dung Nguyen. > > > ------------------------------ > > Date: Sun, 24 Feb 2013 06:54:20 -0500 > From: Doug Lee <doug.lee@xxxxxxxxxxxxxxxx> > 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 > > ------------------------------ > > From: "Nguyen Van Dung" <dungnv1984@xxxxxxxxx> > Subject: [jawsscripts] Re: How to use SayUsingVoice function > Date: Sun, 24 Feb 2013 20:44:45 +0700 > > Hi Paul > Thank you for your information. > > Regards, > Dung Nguyen. > -----Original Message----- > From: jawsscripts-bounce@xxxxxxxxxxxxx > [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Paul Magill > Sent: Sunday, February 24, 2013 6:41 PM > To: jawsscripts@xxxxxxxxxxxxx > Subject: [jawsscripts] Re: How to use SayUsingVoice function > > Hi Dung, > > Sorry, but I think that function is not intended for what you are looking > for... > > The choice of voices that it can use, are only from the currently running > synthesiser, and are the global , keyboard, message & Jaws cursor voices as > > listed below. > > See the extract from the Freedom Scientific FSDN below... > > The constants referred to are in the HJConst.jsh file, which is in the > allUsers folder of Jaws. > > FSDN extract: > Function: SayUsingVoice > Description > Speak a string of text using a specific synthisizer voice. > > Returns > Type: Void > > > Parameters > Param 1: > Type: String > Description: Type in the constant representing the voice to be used. These > constants are defined in the file hjconst.jsh and are listed below: > VCTX_GLOBAL, VCTX_MESSAGE, VCTX_KEYBOARD, VCTX_SCREEN, VCTX_PCCURSOR, > VCTX_JAWSCURSOR > Include: Required > > > ----- Original Message ----- > From: "Nguyen Van Dung" <dungnv1984@xxxxxxxxx> > > > Hello all > I need to say a message with a specific synthesizer and voice. Actually now > > I am having to switch to my synthesizer and voice manually before saying my > > message and switch back to default voice but I do not like this way. > I found a function: SayUsingVoice > According to fsdn book, I can use that function but I do not find any > parameter for my synthesizer and voice, so I do not know how to use it. > Does anyone know to use it? > Thank all. > Regards, > Dung Nguyen. > > __________� > > View the list's information and change your settings at > //www.freelists.org/list/jawsscripts > > > ------------------------------ > > Date: Sun, 24 Feb 2013 08:48:35 -0500 > From: Jamal Mazrui <empower@xxxxxxxxx> > Subject: [jawsscripts] Re: Timing rules for JAWS scripts > > This is a workaround/hack, but what about the following approach for > knowing when speech has stopped? > > Instead of using SayString() or similar, define a function named > something like SayStringAll(), which is passed the string and puts it in > a user buffer that is then spoken with SayAll(). Have a global > true/false variable that indicates whether speech is in progress. Set > the variable to true just before the SayAll(). Define a > SayAllStoppedEvent() function that clears the user buffer and sets the > variable to false. > > Can that global variable then be tested within scripts to determine > whether speech is in progress? If a specific delay is desired after a > string is spoken, might a global variable be set by the SayStringAll() > function before executing the SayAll(), and then that delay be executed > by SayAllStoppedEvent() before it returns? > > Jamal > > On 2/24/2013 6:54 AM, Doug Lee wrote: >> 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. >> >> > > > ------------------------------ > > From: "Nguyen Van Dung" <dungnv1984@xxxxxxxxx> > Subject: [jawsscripts] Re: Timing rules for JAWS scripts > Date: Sun, 24 Feb 2013 20:50:12 +0700 > > Hi Doug > Thank you very much for your detailed explanation. > > 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 > > > ------------------------------ > > Date: Sun, 24 Feb 2013 09:21:24 -0500 > From: Doug Lee <doug.lee@xxxxxxxxxxxxxxxx> > Subject: [jawsscripts] Re: Timing rules for JAWS scripts > > Way to think outside the box there! > > That might work, if one is willing to put up with a few side effects > of using a user buffer. I don't actually know how precise the > SayAllStoppedEvent's call time is relative to actual speech cessation > though. > > The user buffer side effects are these: Possible multi-second delay if > visual display of user buffers is active, the very visual display > itself, and pseudo focus change activity caused by the buffer's > display. Interruption of speech should be fine, but in all cases of > course, you have to worry about closing the buffer on completion as > well. I recommend temporary disabling of user buffer display during > this process. You could probably re-enable display right after > userBufferActivate() safely, but I haven't tested that theory. > > Fascinating approach though. > > On Sun, Feb 24, 2013 at 08:48:35AM -0500, Jamal Mazrui wrote: > This is a workaround/hack, but what about the following approach for > knowing when speech has stopped? > > Instead of using SayString() or similar, define a function named > something like SayStringAll(), which is passed the string and puts it > in a user buffer that is then spoken with SayAll(). Have a global > true/false variable that indicates whether speech is in progress. Set > the variable to true just before the SayAll(). Define a > SayAllStoppedEvent() function that clears the user buffer and sets the > variable to false. > > Can that global variable then be tested within scripts to determine > whether speech is in progress? If a specific delay is desired after a > string is spoken, might a global variable be set by the SayStringAll() > function before executing the SayAll(), and then that delay be > executed by SayAllStoppedEvent() before it returns? > > Jamal > > On 2/24/2013 6:54 AM, Doug Lee wrote: >>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 > > ------------------------------ > > From: "Nguyen Van Dung" <dungnv1984@xxxxxxxxx> > Subject: [jawsscripts] Share data between scripts > 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 > > > ------------------------------ > > From: "Nguyen Van Dung" <dungnv1984@xxxxxxxxx> > Subject: [jawsscripts] How to know a key is pressed > Date: Mon, 25 Feb 2013 03:52:44 +0700 > > Hi all > I have a script which user can only operate it by Up and Down keys. > If user presses any key, the script should be abortted. Then I will have > call a function to clean up data of script. > Does any one know how to get a key event except for Up and Down keys? > > > Regards, > Dung Nguyen. > > > ------------------------------ > > From: "Jim Snowbarger" <Snowman@xxxxxxxxxxxxxxxx> > Subject: [jawsscripts] Re: Schedule events > Date: Sun, 24 Feb 2013 19:47:33 -0600 > > No, in fact, this is what has been discussed before on this list. WE don't > > have a convenient way to determine when the synthesizer has finished > speaking. > The signal is certainly there, somewhere, but we don't seem to have a good > way at getting to it. > The method I have used in the past to try to get around this involved > analyzing the message to be spoken, and calculating a delay time based on > that message. > Somewhere, I have a piece of code that follows the pronunciation rules of > the English language, and analyzes a piece of text to generate a syllable > count. I wrote that for a different purpose, but found it useful here. I > then used the syllable count, in conjunction with speech rate, to create a > > delay interval time. > The more syllables, the longer the delay. > That technique works, sort of, but you would have to write a different > analyzer for each language, and all of that. > Maybe somebody here will notice some clever hook in a sapi5 dll or something > > that will let us query the synthesizer to see if it has finished. > > > ----- Original Message ----- > From: "Nguyen Van Dung" <dungnv1984@xxxxxxxxx> > To: <jawsscripts@xxxxxxxxxxxxx> > Sent: Sunday, February 24, 2013 4:11 AM > Subject: [jawsscripts] Re: Schedule events > > > 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 > > > > > ------------------------------ > > From: "Jim Snowbarger" <Snowman@xxxxxxxxxxxxxxxx> > Subject: [jawsscripts] Re: Timing rules for JAWS scripts > Date: Sun, 24 Feb 2013 19:59:01 -0600 > > Good information,, and exactly what I have seen as well. > I have always been curious about the difference between pause(), and > delay(1). > The FSDN seems to suggest that pause returns control back to the OS for > scheduling, to let other apps run, where delay does not. > I have never determined if that is the case or not. But, it seems like an > important distinction. > But, I certainly have seen the keyboard cancellation of delay that you > mentioned. Kind of handy, actually, and occasionally amusing. > > So, if you really want to wait 2 seconds, and you don't want the keyboard to > > cut it short. put Pause() inside a "for" loop and run it 20 times. > > ----- Original Message ----- > From: "Doug Lee" <doug.lee@xxxxxxxxxxxxxxxx> > To: <jawsscripts@xxxxxxxxxxxxx> > Sent: Sunday, February 24, 2013 5:54 AM > 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 > __________� > > View the list's information and change your settings at > //www.freelists.org/list/jawsscripts > > > > > ------------------------------ > > Date: Sun, 24 Feb 2013 18:49:59 -0900 > Subject: [jawsscripts] Re: Schedule events > From: Soronel Haetir <soronel.haetir@xxxxxxxxx> > > SAPI5 is certainly capable of telling you this sort of thing, but I am > pretty sure you have to have a reference to the voice instance that is > speaking (meaning you would have to get it from jaws, rather than by > just crating a SAPI voice instance yourself). > > And even then that would only work if the preferred voice is SAPI, it > would do nothing for those using eloquence or realspeak direct or > vocalizer voices (which I am certain all have means to signal this > information, but again jaws does not make it available). > > On 2/24/13, Jim Snowbarger <Snowman@xxxxxxxxxxxxxxxx> wrote: >> No, in fact, this is what has been discussed before on this list. WE >> don't >> >> have a convenient way to determine when the synthesizer has finished >> speaking. >> The signal is certainly there, somewhere, but we don't seem to have a >> good >> way at getting to it. >> The method I have used in the past to try to get around this involved >> analyzing the message to be spoken, and calculating a delay time based on >> that message. >> Somewhere, I have a piece of code that follows the pronunciation rules of >> the English language, and analyzes a piece of text to generate a syllable >> count. I wrote that for a different purpose, but found it useful here. >> I >> then used the syllable count, in conjunction with speech rate, to create >> a >> >> delay interval time. >> The more syllables, the longer the delay. >> That technique works, sort of, but you would have to write a different >> analyzer for each language, and all of that. >> Maybe somebody here will notice some clever hook in a sapi5 dll or >> something >> >> that will let us query the synthesizer to see if it has finished. >> >> >> ----- Original Message ----- >> From: "Nguyen Van Dung" <dungnv1984@xxxxxxxxx> >> To: <jawsscripts@xxxxxxxxxxxxx> >> Sent: Sunday, February 24, 2013 4:11 AM >> Subject: [jawsscripts] Re: Schedule events >> >> >> 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 >> >> >> >> __________� >> >> View the list's information and change your settings at >> //www.freelists.org/list/jawsscripts >> >> > > > -- > Soronel Haetir > soronel.haetir@xxxxxxxxx > > ------------------------------ > > End of jawsscripts Digest V7 #46 > ******************************** > __________� > > View the list's information and change your settings at > //www.freelists.org/list/jawsscripts > > -- Blame the computer--why not? It can't defend itself & occasionally might even be the culprit Jackie McBride Ask Me Computer Questions at: www.pcinquirer.com Jaws Scripting training materials: www.screenreaderscripting.com homePage: www.brighter-vision.com __________� View the list's information and change your settings at //www.freelists.org/list/jawsscripts