| Handbook Page ID | 24 |
You can prepare a text file with list of command lines and play the file via Token2Shell. The connected remote system will see the played file as command lines that were typed and sent by you. Token2Shell also supports a set of wait/send style script commands.
When you create a macro file, its content is interpreted by line. A text line ends with <CR><LF> control characters and Token2Shell removes heading and trailing white spaces.
For each line, if the line starts with a "#" character, Token2Shell tries interpret the line as a macro command and its arguments. If it fails, the line is sent as it is along with line-end characters. The line-end characters are determined from the current session states.
// sends "abc" #send "abc"
If you wish Token2Shell to interpret the line starting with "#" as a normal character, use two "#" characters.
// sends "#send "abc"" and line-end characters ##send "abc"Token2Shell supports the following commands:
Sets the interval between sending each non-command line text. If line_send_interval_in_milliseconds is preceded with a minus(-) character, the sending is paused until there is no incoming data for line_send_interval_in_milliseconds.
When a macro file is loaded, the sending interval is set to -300 milliseconds, i.e., the next line is sent when there is no incoming data for 300 milliseconds.
Pauses the macro processing for wait_time_in_milliseconds.
If wait_time_in_milliseconds is preceded with a minus(-) character, the processing is paused until there is no incoming data for wait_time_in_milliseconds.
// Wait for 3 seconds. #wait 3000 // Wait until there is no incoming data for 2 seconds. #wait -2000
Sends "string" (without the quotation marks).
Line-end characters are not automatically sent.
Monitors the incoming data stream and waits until the "string" appears.
You can use the following escape sequence to insert
control or special characters in a "string":
| Escape Seq. | Hex Value | |
|---|---|---|
| \\ | 0x5C | '\' character itself |
| \b | 0x08 | <Backspace> |
| \t | 0x09 | <Tab> |
| \n | 0x0A | <LF> |
| \r | 0x0D | <CR> |
| \e | 0x1B | <ESC> |
| \x{HEX} | {HEX} is interpreted as a HEX value of the character. Ex.) \x09 denotes <Tab> control character. | |
Recent comments
4 weeks 2 days ago
13 weeks 6 days ago
14 weeks 9 hours ago
18 weeks 5 days ago
18 weeks 6 days ago
20 weeks 3 hours ago
20 weeks 4 hours ago
20 weeks 6 hours ago
21 weeks 1 hour ago
21 weeks 23 hours ago