Computer Science Canada Press Enter to continue |
| Author: | Fenrisulfr [ Sun Mar 22, 2009 12:01 pm ] | ||
| Post subject: | Press Enter to continue | ||
I want my program to continue when the user presses the enter key so
but it continues anyway no matter what key I press. What am I doing wrong? |
|||
| Author: | BigBear [ Sun Mar 22, 2009 12:04 pm ] |
| Post subject: | RE:Press Enter to continue |
You need to getch a key then exit your loop when that key is enter. |
|
| Author: | copthesaint [ Sun Mar 22, 2009 12:08 pm ] | ||
| Post subject: | Re: Press Enter to continue | ||
Very basic and easy to do.
|
|||
| Author: | BigBear [ Sun Mar 22, 2009 12:15 pm ] | ||
| Post subject: | RE:Press Enter to continue | ||
If you break your program down line by line you are creating the variable enter and assigning it to chr(13) Isn't enter 10? Then you are in a loop displaying instructions then
Means if a key is pressed (hasch) then get a value for enter then exit the loop. So it doesn't matter what key you enter it will exit. try using an exit when statement. |
|||
| Author: | Fenrisulfr [ Sun Mar 22, 2009 12:26 pm ] |
| Post subject: | Re: Press Enter to continue |
yep got it to work... thank you all! |
|
| Author: | Insectoid [ Sun Mar 22, 2009 1:13 pm ] |
| Post subject: | RE:Press Enter to continue |
I just Input.Pause for these. |
|