"Ignoring" messages
Posted: Tue Aug 06, 2013 4:02 pm
Hi everyone,
Is there a way to have livecode ignore key presses during a certain period of time? I need the program to continue to execute other commands but also disregard any key presses during this phase. The keyDown code is set up similar to what is below:
on keyDown theKey
if theKey is K
then doSomething //this is a function in the code that tells what to do if the key is pressed
else if theKey is d
then doSomething
end if
end keyDown
I only need it to accept the d and k keys and ignore everything else, which it does from what I have tested. Now I need to limit when it accepts the d and k keys - after it's finished running some other code used to set up the screen.
Right now it runs the keyDown code whenever d or k is pressed. I need it to only register the key pressed given during the accepted time and ignore everything else.
Thanks for the help
Jeff
Is there a way to have livecode ignore key presses during a certain period of time? I need the program to continue to execute other commands but also disregard any key presses during this phase. The keyDown code is set up similar to what is below:
on keyDown theKey
if theKey is K
then doSomething //this is a function in the code that tells what to do if the key is pressed
else if theKey is d
then doSomething
end if
end keyDown
I only need it to accept the d and k keys and ignore everything else, which it does from what I have tested. Now I need to limit when it accepts the d and k keys - after it's finished running some other code used to set up the screen.
Right now it runs the keyDown code whenever d or k is pressed. I need it to only register the key pressed given during the accepted time and ignore everything else.
Thanks for the help
Jeff