大家是如何处理接收缓冲区内的数据???例如假设接收缓冲区,需要处理这段字符:+CMTI: "SM",4我的程序大致为
...
mscomm1.InputLen = 1
mscomm1.RThreshold = 0
...
dim strBuffer as string
....
do
strBuffer =strBuffer +mscomm1.input
loop until instr(aa,"+CMTI:")
....上面的代码可以正常截获"+CMTI:"部分,但后面的"SM",4应该如何获取??
...
mscomm1.InputLen = 1
mscomm1.RThreshold = 0
...
dim strBuffer as string
....
do
strBuffer =strBuffer +mscomm1.input
loop until instr(aa,"+CMTI:")
....上面的代码可以正常截获"+CMTI:"部分,但后面的"SM",4应该如何获取??
...
mscomm1.InputLen = 1
mscomm1.RThreshold = 0
...
dim strBuffer as string
....
do
strBuffer =strBuffer +mscomm1.input
loop until instr(strBuffer ,"+CMTI:")
....
do
strBuffer =strBuffer +mscomm1.input
loop until instr(aa,vbCrLf)
Text2 = Text2 & strBuffer
t1 = Split(strBuffer, " ")(0)
t2 = Split(strBuffer, " ")(1)
endif意思是如果想全部取出,就整个放到字符里,根据回车符来读取完整数据。