Waitfor Command Window


This window allows you to create a Waitfor command easily via GUI and insert it into the active editor. See the Waitfor command specification for more information on fields and values defined in the window.

To open the window select Script -> Waitfor Command in the VNCRobot menu. Alternatively select the Waitfor Command Window button in the Events Tab of the Tool Panel.

VNCRobot v1.3 defines three basic types of Waitfor commands. Each of them has a separate tab in the Waitfor Command window:

Waitfor Update

This tab allows you to create a Waitfor update command and insert it into the active editor. The command will be constructed based on selected update event(s) (RFB event FramebufferUpdate) and options defined in the window.

Waitfor update

The first component on the top is a list of recent update events received from the RFB (VNC) server, i.e. FramebufferUpdate events defined by the RFB protocol. These events represent update of a certain area of the remote desktop. Each event in the list displays the update rectangle in form of x:<x>,y:<y>,w:<width>,h:<height>, extent of the update as a percentage of the whole window and time from the last user action. Note that the list displays only update events which are greater than a certain extent. This limit is by default set to 10% and can be customized in the Preferences window. See also help on the Events Tab of the Tool Panel which contains a list with similar functionality.

If you select one or more events in the table, the areas defined by them will display in the remote desktop as red frames and a Waitfor command gets constructed using the options in the window and displayed in the Resulting Command field at the bottom of the window. If you press OK, the command will be inserted into the active editor.


Update Event Options

Generate update area - Select this option to insert the update area into the command (parameter area=x:<x>,y:<y>,w:<width>,h:<height>). If you deselect this option, the parameter will not be inserted into the command. The option is by default on.

Generate update pass rate - Select this option to insert the pass rate (parameter passrate=<value>%) into the command. If the Generate update area option is selected, value of the following option Default overall pass rate will be used. If the option is deselected, the pass rate will be calculated with regards to the update event size, window size and the value of the default overall pass rate. The option is by default on. See help on Waitfor update for more info about pass rates and update area.

Default overall pass rate (in %) - Default pass rate in %. Default value is 95%. This option is used only if the Generate update pass rate option is on.


Update Timing Options

Generate timeout - Select this option to insert a timeout into the command (parameter timeout=<time>). It defines the maximum amount of time to wait for the specified desktop update. If you deselect this option, the parameter will not be inserted into the command. The option is by default on.

Multiple measured timeout by - Safety timeout coefficient. Default value is 3. Let's say you perform a mouse click or press a key to open an application and the window takes 1 second to open. In such a case VNCRobot generates a timeout of 3 seconds (3 x 1 sec). If your computer is not stable in terms of performance, you might want to raise this factor to make sure that the command won't fail when your application for some reasons takes e.g. 5 seconds to open.

Generate minimum timeout - Generate a minimum timeout value flag. If the calculated timeout is lower than the minimum one, use the minimum value instead. The option is by default on.

Minimum timeout (miliseconds) - Minimum timeout value. This option is applied only if the Generate minimum timeout option is on. Default value is 3,000 miliseconds (3 seconds).

Reset wait param of previous command - If the preceding command in the script contains a 'wait' parameter, remove it. It is a good idea because it can make the created Waitfor command fail when the expected update comes during the 'wait' delay defined by the previous command. The option is by default on.


Multiple Updates Options

Use 'wait' rather than 'count' for multiple updates - Some applications update their windows several times when opening. You however usually want to wait until the last update to get the window fully initialized. There are two ways to handle such multiple updates. The first option is use the 'count' parameter and define how many times the screen or specified area must update before proceeding further. This way is however not always safe because VNC servers often behave differently based on their provider and configuration. VNCRobot provides safer method of handling of the multiple updates. Whenever you decide to create a 'Waitfor udate' command, VNCRobot searches all recent update events and defines whether there are multiple updates of the same area. When potential events are found, VNCRobot rather generates a 'wait' parameter based on the time of the latest multiple event and options described below. This approach is safer and more reliable than the 'count' parameter. A disadvantage is that such a Waitfor command will take more time to complete because extra safety wait time is used. This feature is by default on.

Multiply measured delay by - Safety 'wait' delay coefficient. It is used to multiply the delay time when the Use 'wait' rather than 'count' for multiple updates feature is on. Default value is 3.

Generate minimum wait delay - Generate a minimum 'wait' delay value flag. If the calculated delay is lower than the minimum one, use the minimum value instead. The option is by default on. This option is applied only when the Use 'wait' rather than 'count' for multiple updates feature is on.

Minimum wait delay (miliseconds) - Minimum 'wait' delay time. Default value is 3,000 miliseconds (3 seconds). This option is applied only when the Use 'wait' rather than 'count' for multiple updates feature is on.

Waitfor Bell

This tab allows you to create a Waitfor bell command and insert it into the active editor. The command will be constructed based on selected bell event(s) (RFB event Bell) and options defined in the window.

Waitfor bell

The first component on the top contains a list of recent bell events received from the RFB (VNC) server, i.e. Bell events defined by the RFB protocol. To create a Waitfor bell command and insert it to the active editor select one or more events in the list and click OK.


Bell Event Timing Options

Generate timeout - Select this option to insert a timeout into the command (parameter timeout=<time>). It defines the maximum amount of time to wait for the bell event(s). If you deselect this option, the parameter will not be inserted into the command. The option is by default on.

Multiple measured timeout by - Safety timeout coefficient. Default value is 3. Let's say you run a command in a terminal window on your remote computer which beeps once it finishes ("echo -e '\007'" on Unix/Linux systems). If the command takes 3 seconds to finish, VNCRobot will generate a timeout of 9 seconds (3 x 3 sec). If your computer is not stable in terms of performance, you might want to raise this factor to make sure that the command won't fail when such a command for some reasons takes more time to finish.

Generate minimum timeout - Generate a minimum timeout value flag. If the calculated timeout is lower than the minimum one, use the minimum value instead. The option is by default on.

Minimum timeout (miliseconds) - Minimum timeout value. This option is applied only if the Generate minimum timeout option is on. Default value is 3,000 miliseconds (3 seconds).

Reset wait param of previous command - If the preceding command in the script contains a 'wait' parameter, remove it. It is a good idea because it can make the created Waitfor command fail when the expected bell event comes during the 'wait' delay defined by the previous command. The option is by default on.

Waitfor Match

This tab allows you to create a Waitfor match or mismatch command and insert it into the active editor. The command will be constructed based on the options defined in the window and selected image file (if required by the comparison algorithm).




Match/Mismatch Selection

The top component allows you to select between a "Waitfor match" and "Waitfor mismatch". The difference is that a "Waitfor match" commad will hold on the script execution until the remote desktop matches the template while a "Waitfor mismatch" waits as long as the images match.


Template Parameters

This component is actually a plugin originating from the Compareto Command Window. See also the Image Comparison With VNCRobot 1.3 document for more information about image comparison with VNCRobot.


Timing Preferences

Image comparison interval - This parameter defines how often should be the remote desktop compared to the selected template image. VNCRobot compares the images every 3 seconds by default.

Define timeout - Select this option to insert a timeout into the command (parameter timeout=<time>). It defines the maximum amount of time to wait for a match of the remote desktop and selected template image. If you don't select this option, the 'Waitfor match' command will wait until there's a match.

Timeout - Timeout value in seconds. Default timeout is 15 seconds.

Reset wait param of previous command - If the preceding command in the script contains a 'wait' parameter, remove it. The option is by default on.