Skip to main content

If window exists

Sophie avatar
Written by Sophie
Updated this week

Definition and Usage

This command checks if a specified window exists or does not exist in the operating system. It allows you to verify the presence of a window before performing further actions on it, which helps in creating conditional workflows based on window availability.


Parameter Values

Input parameters

Parameter Name

Description

Possible Values

Required

Options / Notes

Get window by

Specify a method to get window

Window object, Title or class, Window UI element

Yes

Determines how the window will be identified

Window

Select a window object that was obtained earlier

Yes (when "Window object" is selected)

Only available when "Window object" is selected

Title

Enter window title

Yes (when "Title or class" is selected)

Only available when "Title or class" is selected

Specify window class

Specify window class

Optional

Additional option to refine window search

Class

Enter window class

Yes (when "Specify window class" is checked)

Only required if "Specify window class" is checked

Match with RegEx

Use regular expressions to match specific text formats

Optional

Allows pattern matching for window titles or classes

Element

Select or capture an element to operate on

Yes (when "Window UI element" is selected)

Only available when "Window UI element" is selected

Existence

Select whether to check if the window exists or not

Exists, Does not exist

Yes

Determines the condition to evaluate

Variables produced

This action doesn't produce any variables.


Using Variables in Conditions

When setting parameter values, you can use variables created in previous steps by inserting them with the {x} format. This is particularly useful when checking for dynamically named windows or when working with window objects that were previously stored in variables.


Notes

  • This command is commonly used in conditional branching to determine the next steps in your workflow based on window existence.

  • When using "Title or class" method, partial matches are supported unless you enable "Match with RegEx" for precise pattern matching.

  • The "Window object" method is more reliable when working with specific application windows that were previously captured or manipulated.

  • For applications with multiple windows having similar titles, using window class can help narrow down to the specific window you need to check.

  • This command only checks for window existence and does not activate or bring the window to the foreground.

Did this answer your question?