Typeing a text line

BlitzMax Forums/BlitzMax Beginners Area/Typeing a text line

how can i get blitz to add letters to a string when they are pressed? spent 30mins and now im tired <:( too simple, too hard

if key_hit(key_a) then my_string$ = my_string$ + "something" ?

no, i wasent spicific enough... more like something like this

if key_hit(*but any key on the keyboard*) then my_string$ = my_string$ + "*what ever key was pressed*" ?

so yeah, if the 'a' key was pressed, then an 'a' would be added to the string. but i want to use the one line to add any letter to the string.

if there is no direct command to return the charictor of the key being pressed i could easily create a function to do it for me, its just that it seems more "basic languageish" to just have a quick command for it.

pardon my french :)

getkey() should do the trick if I remember correctly.

You can use getchar() or loop through x=1 to 256 (I think) for keyhit(x). Look in the code archives under User input for .bmx files.