
-----------------------------------
Punde
Sat Feb 22, 2003 6:09 am

Enter &amp; r keypress
-----------------------------------
Hello,
I want to add to my program a line that says "Press r to rerun enter to continue" I have tried everything and got the r part but not the enter part. I want ONLY r to rerun and ONLY when the user presses Enter the program will continue. Any help with this??? Thx.

[EDIT]
I have another problem :(
I want to make this flag program that displays 5 flags coming from the top going downwards and stopping before they reach the end of the window. I want to do this using a module by making a procedure and calling them on the main program ( I know how to do this part). Can anyone help me with the flag going downwards part??? Thx again.

-----------------------------------
Tony
Sat Feb 22, 2003 10:14 am


-----------------------------------
ASCII value for r is 114 and for "Enter" its 10.


var c:string(1)
getch(c)
put ord(c)

will tell you the ascii value of any key.

About flags going down, just redraw the picture a bit lower... so put that inside a forloop.

-----------------------------------
Punde
Sat Feb 22, 2003 12:43 pm


-----------------------------------
I got the flags now, but I still don't know how to do the Enter and R keypress. Can anyone tell me how??

-----------------------------------
Tony
Sat Feb 22, 2003 2:22 pm


-----------------------------------
i told you, ASCII values for r is 114 and "enter" is 10. Doesn't anyone read  :evil: ?

so

var c:string(1)
getch(c)
if c=chr(114) then
put "you pressed r"
elsif c=chr(10) then
put "you pressed enter"
end if


-----------------------------------
Dan
Sun Feb 23, 2003 2:37 pm


-----------------------------------
if  you  still need more help look at this post:

http://danco.no-ip.com/turing/viewtopic.php?t=285

it is so close to being the same question it is funny, odd how that is, eh?
