# CoolTerm

#### Version:

#### Platform:

Window ID:
Data:

Command | Arguments | Return Value | Description
--- | --- | --- | ---
|  | integer | Opens a new terminal window. Returns the ID of the new window.
| FilePath as String | integer | Loads connection settings. Returns the ID of the opened window, or -1 if loading was not successful.
| ID as integer, FilePath as String | Boolean | Saves the current connection settings. Returns True on success.
|  | integer | Returns the number of currently open terminal windows.
| index as integer | integer | Returns the ID of the window with the specified index.
| WindowName as string | integer | Returns the ID of the window with the specified name, or -1 if the window doesn't exist.
| index as integer | string | Returns the name of the window with the specified index.
| ID as integer | integer | Returns the index of the window with the specified ID.
| ID as integer |  | Closes the specified window.
|  |  | Quits CoolTerm.
|  | string | Returns the CoolTerm version.
| ID as integer |  | Brings the specified window to the foreground.
| ID as integer | Boolean | Prints the current contents of the specified window. Returns True on success.
|  | integer | Returns the ID of the frontmost terminal window. Returns -1 if there are no open or visible windows.
| ID as integer, BringToFront as boolean |  | Makes the specified window the frontmost window. Also brings the window in front of all other windows on the system if BringToFront is True
| ID as integer, Value as boolean |  | Pauses or unpauses the display of the specified window.
| ID as integer | Boolean | Opens the serial port. Returns True on success.
| ID as integer |  | Closes the serial port.
| ID as integer | Boolean | Returns true if the serial port is open.
| ID as Integer | integer | Returns the last serial port error code.
| ID as integer, Data as string |  | Writes the data to the serial port.
| ID as integer, Data as string |  | Writes the data to the serial port and terminates it with the currently selected 'Enter Key Emulation'.
| ID as integer, Data as string |  | Writes the Hex-formatted data to the serial port.
| ID as integer | integer | Returns the number of bytes left in the transmit buffer awaiting transmission.
| ID as integer |  | Polls the serial port.
| ID as integer, NumChar as integer | string | Reads the specified number of characters (bytes) from the receive buffer.
| ID as integer | string | Reads the entire contents of the receive buffer.
| ID as integer, NumChar as integer | string | Reads the specified number of characters (bytes) from the receive buffer, in Hex format.
| ID as integer | string | Reads the entire contents of the receive buffer, in Hex format.
| ID as integer | integer | Returns the number of bytes currently available in the receive buffer.
| ID as integer | string | Returns the contents of the receive buffer without removing it.
| ID as integer | string | Returns the contents of the receive buffer, in Hex format, without removing it.
| ID as integer |  | Clears the contents of the receive buffer.
| ID as integer |  | Sends a break signal.
| ID as integer |  | Flushes the serial port buffers.
| ID as integer |  | Resets the serial port.
| ID as integer | Boolean | Returns the state of the DTR status line.
| ID as integer, Value as boolean |  | Sets the state of the DTR status line.
| ID as integer | Boolean | Returns the state of the RTS status line.
| ID as Integer, Value as Boolean |  | Sets the state of the RTS status line.
| ID as integer | Boolean | Returns the state of the CTS status line.
| ID as integer | Boolean | Returns the state of the DSR status line.
| ID as integer | Boolean | Returns the state of the DCD status line.
| ID as integer | Boolean | Returns the state of the RI status line.
| ID as integer, Value as boolean |  | Sets the state of the break signal.
| ID as integer | boolean | Gets the state of the break signal.
| ID as integer, FilePath as string | Boolean | Sends the specified text file. Returns True on success.
| ID as integer, FilePath as string | Boolean | Starts capture of received data to the specified file. Returns True on successful creation of the capture file.
| ID as integer |  | Pauses the capture currently in progress.
| ID as integer |  | Resumes the currently paused capture.
| ID as integer |  | Stops the capture currently in progress and closes the capture file.
| ID as integer, FilePath as String | boolean | Appends to an existing capture file.
|  |  | Rescans the system for available serial ports.
|  | integer | Returns the number of available serial ports.
| SerialPortIndex as integer | string | Returns the name of the serial port with the specified index.
| ID as integer | integer | Returns the index of the currently selected serial ports.
| ID as integer, SerialPortIndex as integer | Boolean | Selects the serial port with the specified index. This can only be done while the port is closed.
| ID as integer, ParameterName as string | string | Gets the value of the parameter with the specified name.
| ID as integer, ParameterName as string, Value as string | Boolean | Sets the value of the parameter with the specified name.
| ID as integer | string | Returns a list of all parameters (one per line)