|
SendDirect()
Sends data directly to a local device such as a
printer or serial port.
Syntax
SendDirect(<xCodes>, [<cPortName>])
--> lSuccess
Arguments
<xCodes> --> is an ASCII code, a
character or character string, or a collection of numbers or
letters.
<cPortName> --> is an optional parameter
that directs where the contents of xCodes is sent. This is normally
a device name such as LPT1, LPT2, LPT3, COM1 or COM2. If not
specified, output is directed to LPT1.
Returns
Returns a logical TRUE or FALSE value, depending
on whether the function successfully sent the data or not. If the
device could not be found or could not be opened, the return value
is FALSE.
Description
This function is used to send data directly to a
local device such as a printer or serial port. It is useful when
special codes need to be to sent to these devices to trigger
actions such as opening a cash draw.
Example
* Send ASCII code 27
to LPT printer port 1
SendDirect(27,
"LPT1")
* Send ASCII code 27,
15, 1 to printer port 1
SendDirect(CHR(27) +
CHR(15) + CHR(1), "LPT1")
* Send ASCII code 27,
15, 1 to printer port 1
* as a collection of
numbers
SendDirect( { 27, 15,
1 }, "LPT1")
* Send a character
string to LPT2
SendDirect("Testing",
"LPT2")
____________________________
Related Topics
Business
Function List
SendEscapeCodes()
|