Livecode Wiki
Advertisement

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

Examples

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

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.

Advertisement