Wait for Window Title


If writing a macro that changes windows during playback, the macro commands may be ready to execute before the correct window has been activated. This may cause the macro to abort because it didn't find the correct window or subsequent macro commands could play back in the wrong window. To make sure this doesn't happen, insert a Wait for Window Title command instructing the macro to wait until the proper window has focus.


For example, if in a copy and paste routine between two applications, make sure that the macro waits for the second application's window to appear before pasting the copy from the first.



Script Editor > Expand Timing Category > Wait for Window Title



Window Title

Enter the name of the Window (the title in the caption bar of a window). Or click on the Browse button to select from a list of windows currently open on the computer. Choose from Hidden or Visible windows.


Exact Match

This requires that the window name entered matches exactly with the name of the window waiting to receive focus. For example, if listing Notepad as the window name, but the actual window title is Notepad - Untitled, then the macro would not wait.


Partial Match

The Partial Match option does not require an exact window title match. For example, if waiting for a notepad window, inserting "notepad" or "notep" as the window title will find the window. 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 a wildcard is included in the window title name. A wildcard uses the " * " or " ? " characters in the title to expand the possibilities of a match. These are similar to the wildcards used in Windows for searches.





Wait Indefinitely

The macro does not resume until the Wait For action specified has occurred. 


Wait at most

The macro waits the number of  hours, minutes and seconds specified for the Wait For action to occur. If that action does not take place within the specified time frame, the macro takes the action selected in the On Error tab.