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
also
the How to Use Image Comparison document
for more information about image comparison with VNCRobot.

The two buttons on the top allow you to select the dialog mode:
- 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
Compareto
command.
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.
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
image
displays and you can use mouse drags to define which image area to
crop.
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
that
the result depends on the selected Comparison method. If you
select the '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.
When the window is in the "Use an
existing template image" mode, there are two more visible
controls:
- 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
performed immediately.

Other comparison parameters include:
Pass rate (in %) - Image comparison pass rate in %. Default
value
is 95%. It defines how much the images must match to pass the Compareto
command.
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
algorithm
using the VNCRobot 1.3 Open API and
plug
it into VNCRobot.
Comparison area - Allows to define a particular rectangle
area
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
simple
window with the current remote desktop image opens where you can define
the screenshot area using mouse drags.