Skip to main content

COMn:

Type

keyword

Summary

Used with the open file, read from file, write to file, and close file commands, to specify a COM port on Windows systems.

Syntax

COMn:

Description

Use the COM keyword to communicate through a COM serial port.

To set the port parameters (such as baud rate, handshaking, and parity), set the serialControlString property before opening the port with the open file command.

To read data from the COM1: port, use the read from file command, specifying the keyword COM1: as the file to read from.

To write data to the COM1: port, use the write to file command.

tip

You can access any COM port available on the system by using the appropriate index, e.g. COM5:, COM10: etc.

Examples

read from file "COM1:" until end
read from file "COM5:" until end

property: serialControlString

command: write to file, close file, open file, write to driver, read from file

glossary: keyword, Windows, property, command, port

keyword: LPT1:

Compatibility and Support

Introduced

LiveCode 1.0

OS

windows

Platforms

desktop

server

Thank you for your feedback!

Was this page helpful?