In the code below I want to send CTRL G as the output. How do I do it or
what is the code I need to enter.

***Program code***
PUBLIC ComForm
ComForm = CREATEOBJECT('Form')
ComForm.AddObject("Testcom","Olecontrol","MSCOMMLib.MSComm")
ComForm.Testcom.CommPort = 2 && Use Comm2, The second Serial Port.
ComForm.Testcom.Settings = "14400,N,8,1" && 14.4 Kbaud, No Parity,
&& 8 data Bits, 1 Stop Bit
ComForm.Testcom.PortOpen = .T.
ComForm.Testcom.Output = "ATDT555-1234" + chr(13) && Dialing the number
* The chr(13) is needed to complete the modem command sequence
ComForm.Testcom.PortOpen = .F.
***** End Code *****

Rusty

Re: Sending Control G to serial port by Man-wai

Man-wai
Thu Aug 10 21:32:04 CDT 2006

> ***Program code***
> PUBLIC ComForm
> ComForm = CREATEOBJECT('Form')
> ComForm.AddObject("Testcom","Olecontrol","MSCOMMLib.MSComm")
> ComForm.Testcom.CommPort = 2 && Use Comm2, The second Serial Port.
> ComForm.Testcom.Settings = "14400,N,8,1" && 14.4 Kbaud, No Parity,
> && 8 data Bits, 1 Stop Bit
> ComForm.Testcom.PortOpen = .T.
> ComForm.Testcom.Output = "ATDT555-1234" + chr(13) && Dialing the number

change this line to:

ComForm.Testcom.Output = chr(7)

> * The chr(13) is needed to complete the modem command sequence
> ComForm.Testcom.PortOpen = .F.
> ***** End Code *****


--
SoftMedia Technology Co., Ltd.
Website: http://www.softmedia.hk Tel: (852)2743 4228
* TryEasy Accounting/POS/Trading/ERP solutions

Re: Sending Control G to serial port by Man-wai

Man-wai
Thu Aug 10 21:37:00 CDT 2006

> ComForm = CREATEOBJECT('Form')
> ComForm.AddObject("Testcom","Olecontrol","MSCOMMLib.MSComm")
> ComForm.Testcom.CommPort = 2 && Use Comm2, The second Serial Port.
> ComForm.Testcom.Settings = "14400,N,8,1" && 14.4 Kbaud, No Parity,

14400 is the baud rate of the connection to the cash drawer. Your drawer
may not work at 14400, but 9600 or even slower (say 2400) ....


--
SoftMedia Technology Co., Ltd.
Website: http://www.softmedia.hk Tel: (852)2743 4228
* TryEasy Accounting/POS/Trading/ERP solutions