Basic file problems
Posted: Tue Aug 25, 2009 4:33 pm
Hello,
I have a problem with a basic file. What I do is send a file from a scale to a label printer. The label printer has basic programming commands so i can parse the data. My problem is this, When the file sent has one line as below
003, 300 kg
I can use the code below to trim out just the weight.
CLS
HOME
BEEP
:START
A$=""
INPUT A$
C$=RIGHT$(A$,7)
A$=LEFT$(C$,4)
TEXT 41,67,"4",0,2,2,A$
TEXT 321,67,"4",0,2,2,A$
PRINT 1, 1
GOTO START
EOP
MOVE
My issue is that i have a scale that puts out two lines of text as below
2008. 12. 26 42:25
005, 1254kg
and it is only the 1254kg that i require to print. For the life of me i cannot figure out how to read in the second line. No matter what i try it only accepts the forst line of text sent to it. Any ideas.
nzgregor
I have a problem with a basic file. What I do is send a file from a scale to a label printer. The label printer has basic programming commands so i can parse the data. My problem is this, When the file sent has one line as below
003, 300 kg
I can use the code below to trim out just the weight.
CLS
HOME
BEEP
:START
A$=""
INPUT A$
C$=RIGHT$(A$,7)
A$=LEFT$(C$,4)
TEXT 41,67,"4",0,2,2,A$
TEXT 321,67,"4",0,2,2,A$
PRINT 1, 1
GOTO START
EOP
MOVE
My issue is that i have a scale that puts out two lines of text as below
2008. 12. 26 42:25
005, 1254kg
and it is only the 1254kg that i require to print. For the life of me i cannot figure out how to read in the second line. No matter what i try it only accepts the forst line of text sent to it. Any ideas.
nzgregor