Using the Display Interface
BlueZone Scripts support the ability to "Wait For" a specific text string or LU Function to appear in the host session screen. Wait_For is one of the more versatile BlueZone Script functions.
The purpose of using Wait_For in a BlueZone Script is to cause the script execution to suspend until the specified text string is found in the host session window. This feature is useful if you are running a script that automatically logs the user into an application and you don't want the script to enter the user name and password until the host is ready.
Also, this feature is useful if you want to be absolutely certain that the host is on a specific screen before the script continues.
In addition, you can set a time out value so that if the text string is not found within the desired time, you can script a predicable outcome.
The following screen shot shows the Wait_For dialog configured to wait for the text string "Username" at the exact location of row 19, column 17 with case sensitive search and a time out of 3 seconds.
For example, you can wait for the desired text string starting from the very upper left hand corner of the host screen and search to the very end of the screen. Or, if desired, you can wait for the desired text string starting at a specific row and column location, or you can wait for the desired string only when found at a specific row and column on the host screen.
In the following example, the text string "Username" is being used as the Wait_For value.
Examples:
Wait_For "Username" starting at position 1,1 to the end of the screen
Wait_For "Username" starting at position 12,6 to the end of the screen
Wait_For "Username" at exactly position 24,1
In addition to the Wait_For options above, you can also make the search case sensitive and add an optional "Timeout" value. The advantage to using the Timeout value is that you can invoke boolean logic to branch the script based on the result of the Timeout value. For example, if the Timeout value is reached and the desired string is not found, you can branch to a specific part of the script or to a specific outcome, like ending the script. On the other hand, if the desired string is found within the Timeout value period, you can branch to a specific part of the script with a completely different outcome, like continuing the script.
NOTE Wait_For can also be used to wait for LU Functions specified in angle brackets. LU Functions are host commands that are typically sent from the keyboard. Examples are the "Enter" key, the "Tab" key and other host specific commands like "Function" keys. The LU functions will vary depending on the particular host that the script was written for.
Related Topics: