Hi Raz
Here are two methods I use:
1.
When the till is connected to the printer
Insert a bell character CHR(7)into a text file (let's call it tillfire.txt) and from your program issue the following command:
RUN TYPE TILL1.TXT>LPT1
This will flash a DOS window, but it is so quick as to be barely discernable.
This bypasses the Windows spooler which strips out CHR(7)
2.
This one is when the till is connected to a serial port and requires foxtools.fll
*****************************************************************
PROCEDURE Till2com
PARAMETERS mfPort
MFPort = ALLTRIM(MPort)+":"
IF mfport = "COM1:" OR mfPort = "COM2:" OR mfPort = "COM3:" OR mfFPort = "COM4:"
ELSE
?? CHR(7)
WAIT "Invalid COMM Port .. Press A Key" WINDOW
RETURN
ENDIF
MDialStr = "X"
*// We will fire an X at it
opencomm = RegFn("OpenComm","CII","I")
writecomm = RegFn("WriteComm","ICI","I")
closecomm = RegFn("CloseComm","I","I")
MComPort = CallFn(opencomm,mfPort,100,100)
=CallFn(writecomm,MComPort,MDialStr,LEN(MDialStr))
=CallFn(closecomm,MComPort)
Cheers
John
To move a mountain start with the smallest stone