Wait


It is possible that a macro can get ahead of itself - play back faster than the computer can move between windows or programs. These Wait commands instruct the macro to wait until a specific action occurs, such as a window appearing on the screen or a web page to fully load, before continuing.
 

 

Keyboard Express - Editor > Wait
 
Wait for Window Title

If creating a macro that changes windows during playback, the macro commands may be ready to execute before the correct window has been activated. This will either cause the macro to abort because it didn't find the correct window or it will play back in the wrong window. To make sure this doesn't happen, insert a command instructing the macro to wait until the proper window has focus.
 
For example, if performing a copy and paste routine between two applications, make sure the macro waits for the second application's window to appear before pasting the copy from the first.
 
With the Wait for Window Title option selected, an edit box will request the name of the window title that the macro should wait for. Just type in the name of the window title (the title in the caption bar of a window).

 

The window title does not need to be an exact match. Use the full Window Title or a partial name. For example, "notep" would be sufficient to find the "notepad" window. With this option in place, the macro will now wait for the window title to appear on screen before it continues with the remaining steps.
 

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 Name 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 for Window Title to Lose Focus
This option will instruct the macro to continue after the selected Window has lost focus or been minimized with another window now on top. With the Wait for Window Title to Lose Focus option checked, an edit box will request the name of the window title to lose focus. Just type in the name of the window title (the title in the caption bar of a window). This window title does not have to be an exact match. Use the full Window Title or a partial name. For example, "notep" would be sufficient to find the "notepad" window. During macro playback, the macro will pause until the window title selected has lost focus.
 

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 Name 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 for Key Press
During macro playback the macro waits until the key selected is pressed. The user may input text, move the mouse, etc. until that key is pressed. Once the selected key is pressed, the macro resumes. 

 

Key Press to Wait for

Select the key to use from the drop down list. During playback, the macro stops when it reaches the Wait for Key Press command in the script and waits for the selected key to be pressed. Choices include letters of the alphabet, the function keys or several other common keys such as Enter, Tab, etc.

 

Note: Use caution when this command follows keystrokes. For example, consider a macro that plays back the <TAB> key followed by the Wait for Key Press command. Since the previous instruction is to play back the TAB key, do not select the TAB key as Wait For key.

 

Keyboard Express sees the instruction to play the <TAB> key, thinks it is finished waiting and continues with the macro. It will look like the Wait for Key Press did not function properly. In this situation, either select a different key or insert a Delay command after the <TAB> command. Or use the Wait for Text to Play Back command. This will ensure proper macro functionality.

 

This situation applies for other keys as well, such as Enter, Space, F12, etc.

 

 

Wait for Text Play Back
This option would only be used immediately after text playback. Wait for Text Playback prevents the macro from continuing until all of the text has finished playing back.  
 


Wait for Time to Elapse
The macro will wait a specified number of minutes and seconds before continuing. This command is similar to the "Delay" command, but with a couple of noticeable differences. First, a much longer wait period (up to about 7 days) may be selected. And perhaps more importantly, this command puts Keyboard Express into a wait state where virtually no CPU cycles are used, thus allowing CPU intensive programs to continue uninhibited.

 

Insert the hours, minutes and seconds required for the Wait.
 
Note: This command suspends Keyboard Express for the amount of time specified. During this time the macro cannot be terminated by pressing the Scroll Lock+Pause keys or by right clicking on the icon in the system tray.
 
Warning: By putting Keyboard Express into this wait condition, Keyboard Express will not be accessible, including the option to stop the macro until the specified time has elapsed. Use this command with caution.
 

 
Wait for Web Page to Load
The macro will wait until a web page has finished loading before it will continue. This command usually follows a "Web Site" command. Enter a partial or complete URL in the URL field of the Wait for Web Page command.
 
This command waits for Internet Explorer to report the URL that it last loaded. With some web pages, the URL requested is not the last URL that is loaded. For these type web sites there are two choices:
 

1. Leave the URL field of the Wait for Web Page command empty. Doing this will cause the macro to wait until Internet Explorer reports that it is not busy. This will work correctly for many web pages.

 

2. Enter the actual URL that is loaded last into the URL field. To discover what the last URL loaded is, enter some text in the URL field, perhaps "JUNK" and set the "Wait a Maximum of:" field to something short, like 45 seconds or 1 minute. Then run the macro containing the Wait for Web Page command. After 45 seconds or 1 minute a message will pop up that includes the last loaded URL. It may be necessary to repeat this step with a longer wait time to make sure the web page has actually been loaded. Then, upon verifying the actual URL that is loaded last, enter all or part of that URL in the Wait for Web Page command.

 
Note: The Wait for Web Page to Load command only works with Internet Explorer.
   


 
Wait Indefinitely
With this option checked, the macro will not resume until the Wait For action has occurred.  
 
Wait a Maximum of ___ Minutes ___ Seconds
With this option checked, the macro will wait 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 will abort.