Transmit text to port

Command group Flag affected Reversible Execute on client Platform(s)
Reports and Printing YES NO NO All

Syntax

Transmit text to port ([Add newline]) {text}

Options

Add newline If specified, the command sends a newline character sequence after sending the text

Description

This command sends text to a port; for example, you can send printer control characters. To transmit control characters, you can use the chr() function inside square brackets. For example, [chr(27,14)] sends escape 14.

The Add newline option enables you to send end of line characters after each line of text.

An error occurs and the flag is cleared if the port has not been selected or if the user presses Ctrl-Break/Ctrl-C/Cmnd-period while waiting for the output buffer to be emptied.

When you use a printer connected to the port, this command lets you send escape codes to control print characteristics.

Example

# Send text followed by the report rMyReport to a port
Set port name {1 (Modem port)}
Set port parameters {1200,n,7,2}
Transmit text to port (Add newline) {This is my report}
Set report name rMyReport
Send to port
Print report
Close port