Scripting Class
Namespace: Rebex.TerminalEmulation
Assembly: Rebex.Terminal.dll (version 7.0.9147)
Provides enhanced scripting functionality. Makes it possible to programmatically send commands and process responses.
Syntax
public class Scripting
Inherited Members
Properties
Name | Description |
---|---|
Auto |
Gets or sets whether to automatically match prompt in Wait |
Final |
Gets the exit code of the receiving channel when the connection was closed. |
Hold |
Gets or sets a value indicating whether to hold received data in Received |
Last |
Gets the result of last called Read |
Prompt | Gets or sets the sequence that is used to detect command prompt.
To use regular expressions, prepend the string with "regex:".
To use wildcards, prepend the string with "mask:".
Prompt sequence is used by Read |
Received |
Gets data received since the previous data-receiving method.
If Hold |
Terminal | Gets the containing terminal object. |
Timeout | Gets or sets the timeout for receiving data in milliseconds. Default value is one minute. |
Trim |
Gets or sets a value indicating whether Read |
Methods
Name | Description |
---|---|
Check |
Checks whether the specified condition is currently met. |
Check |
Checks whether the specified conditions are currently met. The events are processed as if the OR operator was applied. |
Close() | Closes the connection to the server. |
Detect |
Detects the prompt which the server currently uses and sets the Prompt property. |
Keep |
Sends a keep alive packet (NOOP) to the server. |
Process() | Processes response from the server. If no data is available to be received, waits until the Timeout interval expires. |
Process(Int32) | Processes response from the server. If no data is available to be received, waits until the specified interval expires. |
Read |
Receives a printable character from the server. |
Read |
Receives response from the server until an end-of-line sequence is received. |
Read |
Receives response from the server until the specified condition is met. |
Read |
Reads the response from previously sent command until the criteria are met. The events are processed as if the OR operator was applied. |
Read |
Receives response from the server until the Prompt is received. |
Send(Function |
Sends a key to the server. This is used for sending function keys such as Enter or F10. |
Send(Function |
Sends a key to the server. |
Send(Console |
Sends a key to the server. |
Send(Console |
Sends a key to the server. This is used for sending simple keys or combinations such as Ctrl+C. |
Send(String) | Sends text to the server. |
Send |
Sends a break request to the server. This may or may not have an effect, depending on the server. Sending Ctrl+C using Send(Console |
Send |
Sends a command to the server and waits for the server to accept it. |
Send |
Sends raw data to the server. |
Wait |
Receives response from the server until a condition is met. |
Wait |
Processes response from the server until a condition is met. The events are processed as if the OR operator was applied. |