Returns the names of all serial ports that are available on the computer.
Serial_GetPortNames ( switches )
|switches||not used, reserved for future use. Leave blank or put "-Unused"|
Data type returned
The returned result is a list of serial ports that are available on the computer that is running FileMaker Pro. Each available port is on a different line. On Mac OS a result can be for example:
On Windows the result will be for example:
Use this function to let the user of the database choose which port to open. Store the name of the chosen port in a global field. You can then check the next time the database is opened whether the portname is still present and ask the user if he wants to change his preference.
If an error occurs an error code is returned. Returned error codes can be:
|$$-108||memFullErr||Ran out of memory|
Other errors may be returned.
Troi Serial Plug-in 3.0
FileMaker Pro 14 to 18
Set Field [ result ; Serial_GetPortNames ( "" ) ]
This returns the names of the serial ports available. On our macOS with a Keyspan USB to serial adaptor installed, the result is this list:
The first 3 ports are supplied by the Keyspan adaptor. The last 3 ports are serial ports over a Bluetooth wireless connection. To be able to use these you need proper Bluetooth hardware.
On Windows the names of the ports might be:
Related script step
|Open Serial Port|