----------------------
We ran across this problem in designing reaction time experiments where =
we needed to record a keypress, then disable keypresses until another =
set of experimental stimulii (words/pictures) were presented. The =
solution I adopted was essentially that proposed by Scott, with the =
addition of a 'switch' variable that was set to 1 after the first =
keypress and then caused the 'keyDown' handler to exit until the switch =
was reset to 0 by a delayed send command.
ie. =20
on keyDown which
global mySwitch
if mySwitch =3D 1 then
exit keyDown
else
(do stuff)
send mouseUp to btn 1 in 60 seconds
end if
end keyDown
btn 1:
on mouseUp
global mySwitch
-- enable keypresses
set mySwitch to 0
-- (call the main handler again)
end mouseUp
\m
-------------------------------------------------------------------------=
mark randell cognitive science programme
tel +61 9 380 3266 university of western australia
fax +61 9 380 1006 perth wa australia 6097
-------------------------------------------------------------------------=
http://babelfish.psy.uwa.edu.au/home.html
-------------------------------------------------------------------------=