ph_comsendstring PowerHome formula function
Description
Sends a string of characters out of the specified COM control.
Syntax
ph_comsendstring ( comnum, data )
Argument |
Description |
comnum
|
The number of the COM control you are referencing. Valid values are 1 thru 5.
|
data
|
The string of characters you wish to be sent.
|
Return value
Integer. Returns 0 if the string is successfully sent. Returns 1 if a comnum < 1 or > 5 is specified. Returns 2 if the specified COM control is not valid.
Usage
This function is also capable of sending binary characters. Characters with ASCII values from 32 to 125 and not equal 92 can be sent as their standard character counterparts. Characters below 32, greater than 125, or equal to 92 must be encoded as an escape sequence consisting of the "\" character followed by three decimal digits representing the ASCII value. For example, the "\" (backslash character) would be encoded as "\092". A carriage return character would be "\013". You may use the escape sequence for the standard characters as well.
You may also encode the escape sequence in a hexadecimal format rather than a decimal format. In this case, the escape sequence consists of the "\" character followed by either an upper or lower case "x" followed by two upper or lower case hexadecimal digits. A carriage return using the hex format would be "\x0D".