Windows Command

This step allows you to perform such habitual operations as starting and shutting down of the program, minimizing and maximizing the windows, opening and printing documents, opening Web pages and others. In addition, the step supports the performance of the Windows console commands, designed to control files and execute the various operations to control and administer the computer.

Basic techniques for working with the step "Windows Command" are examined in "Starting and managing programs".

The command can be entered manually or set by using the buttons "Select File" and "Select a menu item from Start". For the majority of installed programs, it is enough to enter the name – e.g. "WinWord" to launch Microsoft Word, "WordPad" to run the word processor WordPad or "excel32" to launch Microsoft Excel.
The field "Parameters" defines additional parameters passed to the started program.
The drop-down list "Action" allows you to specify what should be done. There are "Run", "Print", "Edit", "Close", "Kill", "Show" actions.
The drop-down list "Display mode" allows you to specify what the window of the run programs will look like while performing "Run", "Print" or "Edit".
The "Default Directory" allows you to specify in which directory the MouseRobot and the run program will search for the specified file, document or program, in the first place. In most cases, it can remain unfilled.
The check box "Wait for termination" determines whether the task will be continued after the successful launch of the program or document opening, or the task has to be suspended for as long as the running program is closed or does not terminate on its own.
The check box "Try search if file not found" indicates that MouseRobot should try to find a file on your computer, even if it is not found in the current directory and the list of default directories specified in Windows.
The successful step performance of the running program or command is stored in the variable {LastProcess}, and can be used to further control the flow of this program performance.
You also can save the information in another variable, by specifying its name in the "Assign result to variable" on the "Common" property page. This will avoid problems with overwriting possible values {LastProcess} in the subsequent calls of the step "Windows Command".
To analyze the success or failure of the step you can check the value of the automatic variable {LastResult}. If the step is successful, {LastResult} = "OK".