02-19-2006, 04:03 AM
Hello... got a problem with a menu. It is working but not as i want:
Now, i want so that if the cursor is on "New" and you press the upp-arrow the cursor goes to the "Exit" choice and the same thing when the cursor are at the "Exit" choice but it wont it just keep going up/down, please help.
Oh, and sorry for my bad English.
Code:
CLS : SCREEN 9
cursorRow = 8
cursorCol = 33
cursorPosition = 1
LOCATE 8, 35
PRINT "New"
LOCATE 10, 35
PRINT "Load"
LOCATE 12, 35
PRINT "Exit"
DO
DO
key$ = INKEY$
LOOP UNTIL key$ <> ""
LOCATE cursorRow, cursorCol
PRINT " "
IF key$ = CHR$(0) + CHR$(72) THEN cursorRow = cursorRow - 2
IF key$ = CHR$(0) + CHR$(80) THEN cursorRow = cursorRow + 2
IF cursorRow = 8 THEN cursorPosition = 1
IF cursorRow = 10 THEN cursorPosition = 2
IF cursorRow = 12 THEN cursorPosition = 3
IF ((cursorPosition = 1) AND (key$ = CHR$(0) + CHR$(72))) THEN cursorRow = 12
IF ((cursorPosition = 3) AND (key$ = CHR$(0) + CHR$(80))) THEN cursorRow = 8
LOCATE cursorRow, cursorCol
PRINT ">"
LOOP
Now, i want so that if the cursor is on "New" and you press the upp-arrow the cursor goes to the "Exit" choice and the same thing when the cursor are at the "Exit" choice but it wont it just keep going up/down, please help.
Oh, and sorry for my bad English.