If Not Window
There are two If Not Window options available. One checks to see if the window is not on top (does not have focus) or if the window is currently not open.
Script Editor > Expand Logic Category > If Not Window
Select the option from the drop down list.
If the Window Is Not Focused
Select this option to test if the selected window does not have focus.
If Window Does Not Exist
Select this option if to test if the selected window is not found (not open on the computer).
Insert the name of the window to test or click on the Browse button to select from the Hidden or Visible windows currently running on your computer.
Partial Match/Exact Match
Select whether the window title must match exactly or if a partial match is sufficient.
The Exact Match requires that the window name entered matches exactly with the name of the window used in the If statement. For example, if using Notepad as the window name, but the actual window open when the macro runs is Notepad - Untitled, then the macro would ignore the If statement.
An exact window title match is not required. For example, insert "notepad" or "notep" as the window title and either would be recognized by the If statement. This is particularly useful as some Window Titles change based on whether a given file is open. Case sensitivity is not required. For example, "NOTepad" will work as well as "notepad".
The title contains wildcards
Select this option if using a wildcard in the window title name. A wildcard includes the " * " or " ? " characters in the title to expand the possibilities of a match. These are similar to the wildcards used in Windows for searches.