>I have this working so far:
>* load mscomm
>oComm = CREATEOBJ('MSCOMMLib.MSComm')
>* Open and Initialize COM port #1 for use
>oComm.CommPort = 1
>oComm.Settings = "9600,N,8,1"
>oComm.InputLen = 0
>oComm.PortOpen = .T.
>
>I have a text file Lable.txt that I want to push to my label printer. When I look at the methods in the debugger I don't see anything but output to push that file. Anyone done this before?
>
MSCOMM doesn't deal with files - it sends and receives character streams. You'd have to write the file out to MSCOMM32 using the Output property.
buffer = FILETOSTR('Label.txt')
oComm.output = buffer
will work with small files, or you can use low-level file I/O to read a line at a time from the file and stuff it out the control - you'll need to make sure to send CR/LFs if you read a line at a time from the file.
>buffer='Label.txt'
>oComm.output = buffer
>
>* Close the port
>oComm.PortOpen = .F.
>release oComm
>
>
>Only problem is that nothing happens at the printer???