Input without input() by Stormwire3rd Sep 2010 17:44
|
---|
Summary Lets you input without having to resort to input(). Description A short program that allows you to input to the screen without using the input() command. Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com Rem Project: Input without Input() Rem Created: Thursday, September 02, 2010 Rem Description: Use input in your app without having to resort to input(). Rem ***** Main Source File ***** sync on sync rate 60 randomize timer() myNum as byte typeNum as byte myNum = rnd(9) + 2 `Generates a random number between 2 and 11. do typeNum = myNum - 1 cls print "Keystate Num = ", myNum set text size 32 set text font "Ariel" set cursor 200, 200 if typeNum = 10 typeNum = typeNum - 10 endif print "Keyboard Num = ", typeNum if keystate(myNum) = 1 cls set cursor 200, 200 print "Keyboard Num = ", typeNum set cursor 0,0 print "ASCII Num = ", myNum myNum = rnd(9) + 2 `Generates a new random number once the correct number is pressed. ENDIF set text size 26 set cursor 170, 350 print "Press the keyboard number..." sync LOOP |