[jawsscripts] Re: Help with a script
- From: Doug Lee <doug.lee@xxxxxxxxxxxxxxxx>
- To: jawsscripts@xxxxxxxxxxxxx
- Date: Wed, 29 Oct 2008 02:47:22 -0500
isSameScript() only tells you if this is the second press. Your
script has to use that information to decide what to run. Usually,
the idea is something like this:
script MyScript()
if isSameScript() then
; Second, press, do something for that.
else
; First press, do something for that instead.
endIf
endScript
You'll also see structures like the following--and note the "return"
line here:
script MyScript()
if isSameScript() then
; Second press, deal with that, then return.
; If you leave this "return" line out, both things will get done.
return
endIf
; First press, deal with that.
endScript
On Wed, Oct 29, 2008 at 01:56:04AM -0400, D!J!X! wrote:
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
Other related posts: