
-----------------------------------
canmovie
Wed Sep 15, 2010 4:05 pm

Skip line when user presses enter
-----------------------------------
What is it you are trying to achieve?
I'm trying to put a command so turing will skip to the next line when the user presses Enter.
What is the problem you are having?
Don't know how to do that

Describe what you have tried to solve this problem
I went to turing help and tried Input.Key.Dow.10


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
put "Press any key then enter to continue"
get Input.KeyDown.10




put "Press any key then enter to continue"
get Input.KeyDown.10



Please specify what version of Turing you are using


-----------------------------------
mirhagk
Wed Sep 15, 2010 8:06 pm

RE:Skip line when user presses enter
-----------------------------------
Input.KeyDown(KEY_ENTER) provides a cleaner way of doing it. (I think that's what it is)

Anyways, it returns an array of true/false values, so you pass it a character array and then use an if statement like so


var chars:array char of boolean
Input.KeyDown(chars)
if (chars(KEY_ENTER) then
      %do rest of it
end if

Now to put a newline you can simply do

put ""

And to wait until the user presses a key you can do

Input.Pause

Depending on what you want to do you can just use that.
