[jawsscripts] Re: Help with a script

Thanks for the help, I finally got it to work!!!

Thanks much, D!J!X! 

-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee
Sent: Wednesday, October 29, 2008 8:38 AM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: Help with a script

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

Other related posts: