CommandWindow::SendInput Method (String^, Boolean)

 

Sends a line of input to the Command window that is processed as if you typed it.

Namespace:   EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

void SendInput(
	String^ Command,
	bool Execute
)

Parameters

Command
Type: System::String^

Required. The command string to send to the Command window.

Execute
Type: System::Boolean

Required. True means, add a newline character and execute the line of input, False means, do not execute the command line.

If the value of Execute is true, SendInput automatically runs the command. Otherwise, you must press ENTER in the Command window to run it. You can construct a command line by repeatedly calling this method. You can then execute it by setting Execute to true on the final call.

You can use SendInput to accumulate multiple lines of input and then execute them whenever you want. This differs from the ExecuteCommand method, which executes instructions immediately after you provide the input string. SendInput is useful if you want to create complex command lines by manually entering distinct aspects of the command line. In addition, when you use SendInput, you can view any output generated by the command. When you use ExecuteCommand, you do not see any output, and you must construct a complete command line in your line of input.

No code example is currently available or this language may not be supported.
Return to top
Show: