i recently had this same problem
i got it to work if it was just arbitrarily getting a new message every loop, try my input function that doesnt hang when ur typing and just put the get message call in ur main loop
my function isnt great but its working
`pass in the string you want to append the new character to
function get_string_from_keyboard(st$ as string)
`get the new scancode
l = scancode()
`for backspaces
if l = 14
st$ = left$(st$, len(st$)-1)
else
`anything else
s$ = inkey$()
if s$ > "" then st$ = st$ + s$
endif
i = 0
`make it wait while the key is still pressed
while scancode() = l
`make it timeout for repeat typing
i = i + 1
if i = 100000 then exitfunction st$
endwhile
endfunction st$
try using this algorithm
DO
CHECK IF ENTER KEY IS PRESSED
SEND THE CURRENT MESSAGE
ENDIF
GET THE NEXT CHARACTER FOR THE MESSAGE
GET THE NEXT INCOMING MESSAGE
PRINT IT
LOOP