Check if the window exists Version 7 (Net)

Action group: Windows


Description

The action checks if the window whose name is specified in the parameters is open.

Action icon

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
Window nameThe name of the window to apply the action to. Search is possible by partial window name using a regular expressionRobin.String
Yes
Time-outTime in milliseconds to find required window.Robin.Numeric
No
Results
ResultIf the value is «true», the searched window exists. If the value is «false», the searched window does not exist.Robin.Booleantrue

Special conditions of use

The action searches among the currently open windows for the window requested by the user.

The user enters the name of the window in the "Window name" parameter.

The action in the "Window exists" parameter returns the result "true" when a window with the specified parameter is found. If the searched window is not found, the result of the action is "false".
If multiple windows with the name specified in the parameters are open, the action should not cause an error. The action returns the value "true".

The action in the "Window available" parameter returns a result of "true" when the searched window is available for interaction. If the searched window is not responding, the result of the action is "false".

Example of use

Task

There is a window on the screen called "Studio Refinements - OneNote Preview". It is necessary to check the existence and availability of the window and record the results in logical variables. 

Solution

Use the "Check if the window exists" action.

Implementation

  1. Move the "Check if the window exists" action to the workspace.

    Fill in its parameters.

    In the "Window name" field, specify the name of the window or the phrase contained in the window name, the existence and availability of which should be checked. 
    In the "Window exists" and "Window available" fields specify logical variables created in advance.
  2. Click "Start" in the top panel to start the robot.

Result

The program robot completed successfully. The existence and availability of the required window is checked and the results are written to variables. 

  • Нет меток