Posted: 11:43am 24 Mar 2014 |
Copy link to clipboard |
 Print this post |
|
Try something like this to begin with (complete with correct indenting!) :
Open "COM2:19200" As #1
Do
Do
By$=Input$(1,#1)
MSG$=MSG$+By$
Loop until By$=CHR$(13) OR By$=CHR$(10) 'Checks for CR or LF
Print MSG$ 'helps give a view as to what is happening
Print ASC(MSG$) ' if this line causes the value 10 to be printed then the LF is your issue
if By$=CHR$(10) Then Goto L2_Done 'if LF when here then no need to check MSG$ so jump over MSG$ checks
If MSG$="1" Then Print" Choice 1"
If MSG$="2" Then Print "Choice 2"
.
.
.
L2_Done:
MSG$=""
Loop
|