Escape codes
You can use C-style escape codes in the ChatinString and ChatoutString properties. This allows you to easily define whether to send escape code sequences after commands.
For example, the following chatin string sends a carriage return
character (
\r
) after the user name and password:ChatinString : ".*: user\r .*: passwd\r .*:"
The following table explains the character sequences that are recognized.
Escape code | Character |
---|---|
\b |
This escape code specifies the backspace character. |
\f |
This escape code specifies the form-feed character. |
\n |
This escape code specifies the new-line character. |
\r |
This escape code specifies the carriage return character. |
\t |
This escape code specifies the tab character. |
\\ |
This escape code specifies the backslash character. |
\' |
This escape code specifies the single quote character. |
\" |
This escape code specifies the double quote character. |
Note: Due to the way in which the above properties are parsed, the
escape sequences for backslash, single quote and double quote must be double-escaped.
For example, to send a backslash character (
\
), use \\\\
.