xsh.Dialog
You can use this to manipulate the Xshell terminal screen. To use the following function and variable, execute it with xsh.Dialog. For example, if you want to use the MsgBox() function, append xsh.Dialog.MsgBox() in the front like this: xsh.Dialog.MsgBox().
Functions | |||||||||||||||||||||||||
Return Value | Function | Parameter | Description | ||||||||||||||||||||||
Long | MsgBox(LPCTSTR lpszMsg) |
| Open a message box. | ||||||||||||||||||||||
string | Prompt(LPCTSTR lpszMessage, LPCTSTR lpszTitle, LPCTSTR lpszDefault, BOOL bHidden) |
| Description
Return Values
| ||||||||||||||||||||||
int | MessageBox(LPCTSTR lpszMessage, LPCTSTR lpszTitle, int nType) |
| Description
Return Values
| ||||||||||||||||||||||
|
Script Sample (Visual Basic)
Sub Main Dim hostname, username, password hostname = xsh.Dialog.Prompt ("Insert Hostname", "Prompt Dialog", "hostname", 0) username = xsh.Dialog.Prompt ("Username", "Prompt Dialog", "", 0) password = xsh.Dialog.Prompt ("Password", "Prompt Dialog", "", 1) if xsh.Dialog.MessageBox("Connect to " & hostname & " server", "MessageBox",1) = 1 then xsh.Session.Open("ssh://" & username & ":" & password & "@" & hostname) End If End Sub