Computer Science Canada Unable to properly use my Input.KeyDown! |
Author: | rovelius [ Tue Apr 27, 2010 9:16 pm ] | ||||
Post subject: | Unable to properly use my Input.KeyDown! | ||||
What is it you are trying to achieve? I would like to be able to create a ENTER procedure in my code. I want to make a quiz which has question/answer, and then like when I click "ENTER" I want it to Clear Screen and move to the next question. I want to be able to make my variable become equal to NOTHING after ENTER has been clicked once, so it has to recheck and make me click ENTER again after other functions What is the problem you are having?
Describe what you have tried to solve this problem I am logically thinking that after I click ENTER, this saves my variable, and it bypasses the IF statement as it has been pressed and it does its function. While I do not want it to do that, I want it to recheck and look for another ENTER before it continues. Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) <Answer Here>
Please specify what version of Turing you are using TURING V4.1 |
Author: | Euphoracle [ Tue Apr 27, 2010 9:52 pm ] |
Post subject: | RE:Unable to properly use my Input.KeyDown! |
You need to delay it. Turing will execute as fast as it can unless you tell it to wait. It will check if enter is pressed, say "YES" then immediately do Q1 then check again (all in under a millisecond!) Consider using delay with an amount >= 50ms. |
Author: | rovelius [ Wed Apr 28, 2010 3:23 pm ] | ||
Post subject: | Re: Unable to properly use my Input.KeyDown! | ||
Thank you very much!!! The delay worked brilliantly. Thank you for your help. This is my final code:
|
: |