xsh.Session
The following functions and variables can be used in Xshell sessions. To use these functions and variables, execute them together with xsh.Session. For example, to use 'Sleep()' function, use 'xsh.Session.Sleep(1000)'.
Functions | |||
Return Value | Function | Parameter | Description |
Void | Open(LPCTSTR lpszSession) | lpszSession | Open a new session or URL. |
Void | Close() | Close the currently connected session. | |
Void | Sleep(long timeout) | Timeout | Make Xshell wait for the designated time. |
Void | LogFilePath(LPCTSTR lpszNewFilePath) | lpszNewFilePath | Designate log file. |
void | StartLog() | Start logging for a session. Log is designated with a path specified in LogFilePath(). If a log file path is not designated, the default path is used. | |
void | StopLog() | Stop logging. | |
BOOL | IsUtf8() | Check if the current terminal encoding is UTF-8 | |
BOOL | SelectTabName() | Specifies a tab in which to apply the script. (This feature is only supported in Single Process Mode.) |
Variable | ||
Name | Type | Description |
Connected | BOOL | Check whether current session is connected. |
LocalAddress | BSTR | Retrieve the local address. |
Path | BSTR | Retrieve the current session file path. |
RemoteAddress | BSTR | Retrieve the remote address. |
RemotePort | long | Retrieve the remote port. |
Logging | BOOL | Check whether current session is recording log file. |
LogFilePath | BSTR | Save as a log file. |
TabText | BSTR | Retrieve the current tab name or change it. |
SessionName | BSTR | Retrieve the current tab's session name. |
UserName | BSTR | Retrieve the current session's user name. |
Description | BSTR | Retrieve the current session's Description. |
ScriptFolderPath | BSTR | Retrieve the current session's script folder path. |