if this.commevent = 2 thisform.buffer = thisform.buffer + this.input * Assuming a CR at the end of the scan IF CHR(13)$THISFORM.inbuffer lnscansize = AT(CHR(13),THISFORM.inbuffer) * extract scan lcmydesiredscan = SUBSTR(THISFORM.inbuffer,1,lnscansize) *delete scan THISFORM.inbuffer = SUBSTR(THISFORM.inbuffer,lnscansize+1) ENDIFor something similar. This leaves the .inbuffer intact in the case there are multiple scans in the buffer.
>if this.commevent = 2 > thisform.buffer = "" > thisform.buffer = this.input >... >>