Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
input without return
#1
How can I write an input statement for a selection menu in a program that does not require a return key input from the user.
Reply
#2
INKEY$
Reply
#3
Use an INKEY$ loop and assign the keypress to a string variable.
Code:
DO: K$ = UCASE$(INKEY$)  'use uppercase letters if alphabetical 'main loop

' menu code goes here...........

LOOP UNTIL K$ = CHR$(27)  'escape program loop

SYSTEM 'closes program

For numerical menues, just use the string number instead of letters.

Ted
Get my QB demonstrator here: http://dl.dropbox.com/u/8440706/Q-Basics.zip
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)