Echo of input

Blitz3D Forums/Blitz3D Beginners Area/Echo of input

mrmango(Posted 2005) [#1]
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


Akira(Posted 2005) [#2]
Try using a combination of write() to display the prompt to the user, and getkey() to record the keystrokes.


mrmango(Posted 2005) [#3]
Yeah thought of that, but it just returns ascii characters. Does anyone have a example to head me off to the correct direction?

Thanks


767pilot(Posted 2005) [#4]
what about flushkeys()

I usually use that before the input$ and it usually works fine for me


WolRon(Posted 2005) [#5]
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.


mrmango(Posted 2005) [#6]
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.


GitTech(Posted 2005) [#7]

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)



pexe(Posted 2005) [#8]
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$)