Echo of input
Blitz3D Forums/Blitz3D Beginners Area/Echo of input
| ||
Is there any way to stop echoing of a input$ or change the character that you type? Tried a few searches and found nothing. Cheers Mango |
| ||
Try using a combination of write() to display the prompt to the user, and getkey() to record the keystrokes. |
| ||
Yeah thought of that, but it just returns ascii characters. Does anyone have a example to head me off to the correct direction? Thanks |
| ||
what about flushkeys() I usually use that before the input$ and it usually works fine for me |
| ||
Yeah thought of that, but it just returns ascii characters. Does anyone have a example to head me off to the correct direction? How are we supposed to know what 'the correct direction' is?If ASCII characters aren't what you want, then why would you be using Input$ in the first place??? Input$ returns a string with strictly ASCII characters... I think you need to explain what it is you are trying to achieve. |
| ||
Sorry, returns the ascii code not actual character. Basically, Need to allow a user to press any key on keyboard, record each keypress and either, do not echo or echo a different character. |
| ||
Sorry, returns the ascii code not actual character. You mean that you receive the ascii code "65" instead of the character "A"? (Just an example). Well, just use the chr$ command: Print Chr$(65) |
| ||
graphics 640,480,16,2 apptitle "Getkey" setbuffer backbuffer() while not keyhit(28) k = getkey() if k select k Case 8 If Len(mytext$)>0 mytext$ = Left(mytext$,Len(mytext$)-1) EndIf Default mytext$ = mytext$ + Chr$(k) end select k = 0 endif cls text 0,0,mytext$ flip wend runtimeerror("You typed: "+mytext$) |