I was actually suggesting you just looked at the input code ... but here it is on it's own
global CurrentInput as string
function InputUserMessage()
local Result as string
local Char as string
local i as integer
` If anything is in the keyboard entry buffer we add the characters one by one to the current input string
if entry$() <> ""
for i = 1 to len( entry$() )
Char = mid$( entry$(), i )
` If it's a backspace, remove the last character
if Char = chr$( 8 )
if CurrentInput <> "" then CurrentInput = left$( CurrentInput, len(CurrentInput)-1 )
else
` If it's a valid character add it to the buffer
if asc( Char ) >= 32 && asc( Char ) < 128 then CurrentInput = CurrentInput + Char
` If it's a return, pass on what we got and start again
if asc( Char ) = 13
Result = CurrentInput
CurrentInput = ""
endif
endif
next i
` Clear out the buffer
clear entry buffer
endif
endfunction Result
Just repeatedly call the 'InputUserMessage' function. When the user hits the enter key the current string will be returned.