CommandWindow
Object
Description
Provides access to the command (chat) window.
Syntax
Remarks
None.
CommandWindow Object Properties and Methods
|
|
|
Description
Returns or sets a Boolean value indicating whether commad window text should be sent to all sessions.
VBScript
Syntax
crt.
Example
crt.CommandWindow.SendToAllSessions = True
Python
Syntax
crt.
Description
Returns or sets the text in the command window.
Remarks
Read/Write string property. Multiple lines can be added to the command window by CRLF.
VBScript
Syntax
crt.CommandWindow.Text [ = text ]
Example
crt.CommandWindow.Text = chr(27) & ":q"
' Get text currently in the command window
strText = crt.CommandWindow.Text
' Populate command window with multiple lines
crt.CommandWindow.Text = "ls -l" & vbcrlf & "pwd" & vbcrlf & "whoami"
Python
Syntax
crt.CommandWindow.Text [ = text ]
Example
crt.CommandWindow.Text = "ls -l\r\npwd\r\nwhoami"
Description
Returns or sets a Boolean value indicating whether the command window is visible.
VBScript
Syntax
object = crt.CommandWindow.Visible
crt.CommandWindow.Visible = [ True | False ]
Example
' Capture current visibility/state of the command window
bCommandWindowVisible = crt.CommandWindow.Visible
' Make sure command window is visible
crt.CommandWindow.Visible = True
' ... do other work...
' Restore command window's state
crt.CommandWindow.Visible = bCommandWindowVisible
Python
Syntax
object = crt.CommandWindow.Visible
crt.CommandWindow.Visible = [ True | False ]
Example
# Capture current visibility/state of the command window
bCommandWindowVisible = crt.CommandWindow.Visible
# Make sure command window is visible
crt.CommandWindow.Visible = True
# ... do other work...
# Restore command window's state
crt.CommandWindow.Visible = bCommandWindowVisible
Description
Sends the current text in the command window to the remote machine.
VBScript
Syntax
crt.CommandWindow.Send
Python
Syntax
crt.CommandWindow.Send()