CommandWindow Object
Description
Provides access to the Command window.
Syntax
Remarks
None.
CommandWindow Object Properties and Methods
|
|
|
Description
Returns or sets a Boolean value indicating whether Command 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()