open driver | ||||||||||
Type | command | |||||||||
Dictionary | LCS | |||||||||
Library | LiveCode Script | |||||||||
Syntax |
| |||||||||
Summary | Establishes a connection to a device so you can send data to it or get data from it. | |||||||||
Introduced | 1.1.1 | |||||||||
Changes | The encoding parameter was introduced in version 7.0 | |||||||||
OS | mac, windows, linux | |||||||||
Platforms | desktop, server | |||||||||
Parameters |
| |||||||||
Example |
| |||||||||
Values |
| |||||||||
Related | Keyword: COMn: Property: serialControlString, recordInput Command: write to driver, open file Glossary: property, Unix, statement, command, peripheral device, OS X Control Structure: function | |||||||||
Security | disk | |||||||||
Description | Use the open driver command to communicate with USB devices, devices attached to a serial port other than the modem and printer port, and other peripheral devices. If you don't specifyormode, the driver is opened in text mode. (For most devices, you should use binary mode.) Use the read form to open the driver for reading. If the driver is opened for reading, you can use the read from driver command to get data from the device, but you can't send data to it. Use the write form to open the driver for writing. If the driver is opened for writing, you can use the write to driver command to send data to the device but you can't read from it. Use the update form to open the driver for both reading and writing. If the driver is opened for update, you can use both the read from driver and write to driver commands to send data to the peripheral device|device or get data from it.
On Windows systems, the open driver command is equivalent to the open file command when the driverName is COM1:, COM2:, etc. If the device is a serial port, you can set the serialControlString property to specify the speed, parity, and other settings. Set the serialControlString before using the open driver command. | |||||||||
Tags | networking |