[jawsscripts] Re: Help with a script
- From: "Paul Magill" <magills@xxxxxxxxxxx>
- To: <jawsscripts@xxxxxxxxxxxxx>
- Date: Thu, 30 Oct 2008 21:19:11 +1100
Hi Doug,
In the situations where I have used it, the single press code has run very
quickly, so I did not need to consider the problem you expressed.
By experiment, I chose 3 as a reasonable compromise between not waiting too
long to hear the single press info, & not having the single press info begin
to speak before being cut off by the second press.
I guess it all depends on how quick one is at the double hit, & one's
expectation of a response. smile.
Regards,
Paul
----- Original Message -----
From: "Doug Lee" <doug.lee@xxxxxxxxxxxxxxxx>
Paul, I like. :)
One question though: Why delay(3) instead of delay(5), to match the
normal IsSameScript() timeout? Normally, when I have to worry about
this problem, it's because the single-press task is time-consuming and
would otherwise complicate even reaching the multi-press task. A
delay of 3 would make task 1 run faster but would not solve that
particular problem.
I've normally used ScheduleFunction to handle this situation, but
that's a little messier in code.
Btw, to the original poster: My apologies, I think I misread what you
had already tried. On this list, I don't always know who is new and
who is not. :)
On Wed, Oct 29, 2008 at 11:08:13PM +1100, Paul Magill wrote:
Hi,
there are several valid ways of approaching this.
Below is my preferred method.
The line:
Delay (3) IF IsKeyWaiting () THEN RETURN ENDIF
smoothes the saying of any information in the double hit situation, & is
optional
Script TestOnF8 ()
IF IsSameScript () THEN ; double or more hits
SayString ("double") ; for testing only
; do the double hit things
ELSE ;single hit
Delay (3) IF IsKeyWaiting () THEN RETURN ENDIF
SayString ("single") ; for testing only
; do the single hit things
ENDIF
EndScript
----- Original Message -----
From: "D!J!X!" <megamansuperior@xxxxxxxxxxx>
Hello list, Here's my scenario.
I created a script, but I want it to perform something different if that
script's key is pressed twice in a row. I'm aware of the IsSameScript
function, however the IsSameScript function performs the original script
ones before doing whatever I call if the IsSameScript function is true.
Basically, I want the script to run something if the key is pressed once,
and something completely different if the key is pressed twice. No matter
what, when I press the key twice, the second set of instructions is
performed, but the first set is also performed. I want a way to stop it from
doing so. I've tried if statements, using values returned from the
IsSameScript function, but no go. Any ideas???
Thanks, D!J!X!
__________?
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
--
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
__________
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
- References:
- [jawsscripts] Help with a script
- From: D!J!X!
- [jawsscripts] Re: Help with a script
- From: Paul Magill
- [jawsscripts] Re: Help with a script
- From: Doug Lee
Other related posts:
- » [jawsscripts] Help with a script
- » [jawsscripts] Re: Help with a script
- » [jawsscripts] Re: Help with a script
- » [jawsscripts] Re: Help with a script
- » [jawsscripts] Re: Help with a script
- » [jawsscripts] Re: Help with a script
- » [jawsscripts] Re: Help with a script
- [jawsscripts] Help with a script
- From: D!J!X!
- [jawsscripts] Re: Help with a script
- From: Paul Magill
- [jawsscripts] Re: Help with a script
- From: Doug Lee