Compareto Command Window
This window allows you to create a
Compareto command easily via GUI and insert it into the active editor.
If the window is opened while the caret is on an already existing
Compareto command in the active editor, it allows to edit the command.
See the Compareto
command specification for more information on fields and values defined
in the window. To open the window either select Script -> Compareto Command or click
on the corresponding toolbar button in the VNCRobot menu. To edit an
existing command perform a right mouse click on the command in the
editor and select "Properties" in the context popup menu.
The major window component, the Template Properties panel, is also used
in the Waitfor Command Window and Screenshot Command Windows dialogs. See
the Image Comparison With VNCRobot 1.3
for more information about image comparison with VNCRobot.
The two buttons on the top allow you to select the dialog mode:
The image operations provided by the window are performed in the
template directory by default, i.e. in the folder defined by the _TEMPLATE_DIR variable
of the associated script. If this variable is not defined, your home
folder is used. If you need to create or open a template image from a
different location, type it with a full path.
- If you select the "Create a new
template..." button, the window will let you create a new
template image based on the current remote desktop image.
- If you select "Use an existing
template image", you will be able to select an already existing
template image and eventually edit it. This mode should be selected
automatically when you open the window for an already existing
To edit the template image either select the "Edit Template" button or double
click the image preview component. A new window with a full screen
displays and you can use mouse drags to define which image area to
Note that though the image preview component will then display a
cropped image, the Edit Template window will always display the full
size image and you can edit the crop area as many times as needed. The
image gets really cropped and saved to a file only when the Compareto
Command Window is finished with the OK button.
To compare the selected image with the current desktop press the "Compare..."
button. Comparison result in % will display in a popup window. Note
the result depends on the selected Comparison method. If you
'search' method, the comparison result popup
will also display a list of coordinates where the template image was
located and it will let you open a simple window with a copy of the
remote desktop image with the highlighted search matches.
Button "Load RD Image..."
allows you to load an image from a file and perform image comparisons
through the "Compare..."
button against it rather than against the remote desktop image. This
feature is designed to help you to troubleshoot failed image
comparisons which happened in the past, e.g. during automated test
executions. It will have no effect on your script command. To switch
the dialog back to the current remote desktop image click the same
button again (it should read "Reset
RD Image" when a custom image is loaded) or simply close and
reopen the dialog.
The "Preferences" button
serves as a shortcut to the image comparison preferences located in the
Compareto command panel.
When the window is in the "Use an
existing template image" mode, there are two more visible
- A button located close to the template name field and labeled "..." allows to open a file browser
and select a template image in the local file system.
- To delete an existing template image use the "Delete" button. This action is
Other comparison parameters include:
Pass rate (in %) - Image comparison pass rate in %. Default
is 95%. It defines how much the images must match to pass the Compareto
Image comparison method - Method to be used to compare the
selected image and remote desktop. VNCRobot 1.3 by default provides two
image comparsion algorithms (methods) which are described in the
Compareto command specification. You can also write your own
using the VNCRobot 1.3 Open API and
it into VNCRobot.
Comparison area - Allows to define a particular rectangle
to be used for image comparsion. If this parameter is omitted, the
comparsion will be performed on the whole remote desktop image. If you
click the "..." button, a
window with the current remote desktop image opens where you can define
the screenshot area using mouse drags.