home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
pmate.zip
/
PMATE.INF
(
.txt
)
< prev
next >
Wrap
OS/2 Help File
|
1993-06-17
|
46KB
|
1,200 lines
ΓòÉΓòÉΓòÉ 1. Introduction ΓòÉΓòÉΓòÉ
PMATE stands for Presentation Manager* Automated Test Environment. User inputs
to an OS/2* 2.0 based system may be recorded and replayed to automate
functional testing of software.
Events will be captured and stored in a readable and editable form. Individual
recorded segments may be merged to create more comprehensive tests.
PMATE provides an editor for viewing and modifying a recorded script.
No additional hardware is required. PMATE may be used on any OS/2* 2.0 or
greater system. PMATE does not take up much screen area, just a small icon in
the lower left hand corner for access to PMATE functions during recording and
playback.
PMATE is an automation tool which is intended to help remove the boring,
repetitive tasks from the test activity, especially regression testing.
This on-line reference file, pmate.inf, provided with the package explains how
to install and use PMATE. We recommend that you study this on-line reference
file thoroughly before using PMATE for the first time. (This file can also be
viewed from within PMATE, by selecting Help->Reference from the PMATE main
menu.)
ΓòÉΓòÉΓòÉ 2. Functional Overview ΓòÉΓòÉΓòÉ
PMATE is a macro recorder and testing productivity tool which provides the
following features and functionality:
o Ease of Use features:
- Scripts are recorded to and played back from a readable, editable text
file (not an unreadable, uneditable binary file).
- Testcase scripts can be modified easily as the system under test evolves
and changes. (When a comparison fails, the user is prompted to request
that the existing bitmap or CRC value be replaced with the new one, if
that is appropriate.)
- An easy visual mechanism is provided for detecting errors in the system
under test. PMATE displays previous and current views of bitmap areas
side-by-side on-screen.
- An unobtrusive record / playback mechanism, features a powerful set of
menu items which pop-up from a single small icon. This avoids the need to
remember a variety of hot key combinations, and avoids having an
application window obscuring a major portion of the screen.
- PMATE supports the recreation of the conditions of the recorded test, by
recording and restoring the positions and sizes of windows (upon command
from the user, or automatically).
- Comment lines can be included manually at any time during the recording
process (or edited in afterwards).
- Comment lines can be generated by PMATE and included automatically after
user-selectable events
o Flexibility features:
- Two recording methods: recording events as macro-level script elements, or
as each and every individual "WM_" message generated by PM.
- Two playback modes: interactive or unattended (batch-mode) playback.
- Customizable settings for maximum recorded delays; comparison repeat
counts and intervals; and fonts.
- Automatically generated, as well as user-inserted, comment lines.
- Automatic or user-specified fixing of the position and size of windows.
- Automatic or user-specified naming of bitmap files.
- Two modes of script recording: verbose (English-language-like) or terse
(abbreviated, programmatical style).
o Storage minimization features.
PMATE minimizes storage requirements (without losing any necessary
information), by:
- Combining events into macro-level script elements (such as "drag from a to
b", instead of a long series of mouse events)
- Ignoring unimportant mouse movements
- Allowing the user to designate AREAS of the screen, not just the entire
screen, to be saved. (PMATE saves these areas as separate disk files in
the standard OS/2 bitmap format.)
- Allowing areas of the screen to be encapsulated as a CRC value (a single
number of up to 10 digits stored within the script file).
- Providing a terse recording mode in which all command syntax is heavily
abbreviated.
- Allowing separate recording units (segments) to reside in the same script
file, but be played back either individually or in designated groups.
(This helps avoid lots of small files which each occupy a minimum of 4K on
disk.)
o Unattended testing support:
- PMATE can be invoked in a non-interactive mode, either from a command
prompt, or from within a REXX script, command file, or any program that
can launch an application (e.g. using DosExecPgm).
- In automatic mode, PMATE does not display message boxes and does not wait
for responses from the user.
- Errors are logged to a file (optionally overwriting or appending to the
file), with 3 selectable levels of detail.
- An error code is returned to allow branching decisions within a REXX or
command file, or another application.
- Whenever a bitmap or CRC comparison fails, the failed screen area is saved
to a bitmap file on disk, and the file name is written in the error log.
The user can then view these bitmaps at a later time.
ΓòÉΓòÉΓòÉ 3. Installation ΓòÉΓòÉΓòÉ
PMATE currently has no automated installation procedure.
o QUICK INSTALLATION / START-UP PROCEDURE
1. Create a new directory ("\pmate" is suggested).
2. Copy all the pmate files (pmate*.*) to the \pmate directory.
3. Change directory to your \pmate directory.
4. Type PMATE <Enter>.
o NORMAL INSTALLATION
1. Copy the following files to the specified directories:
File Location
pmate.exe Anywhere on the PATH.
pmate_if.exe On the PATH, preferably in the same directory as pmate.exe.
pmate_rp.dll On LIBPATH.
pmate.inf In a directory specified by the BOOKSHELF environment
variable.
pmate.hlp In a directory specified by the HELP environment variable.
pmaterun.hlp In a directory specified by the HELP environment variable.
pmate_f.ico Folder icon which may optionally be used. Should be in the
same directory as pmate.exe.
pmate.ico Icon for the PMATE executable. Should be placed in the same
directory as pmate.exe.
pmate_rd.me Late breaking information on new features and known
problems.
2. Verify the settings of all pertinent environment variables.
3. [Recommended] Create a new folder to contain the PMATE executable and
online command reference.
(There are two icon files supplied: Associate these icons with the
folder, pmate_f.ico, and program, pmate.ico. Also, COPY one of the icons
from the OS/2 information folder to the new pmate folder, then change
the Parameters to "view \pmate\pmate.inf", and the Working directory to
"\pmate".)
Script files, logfiles and bitmap files are all stored in the current working
directory by default. However, you can supply a specific drive and path to
override that default.
ΓòÉΓòÉΓòÉ 4. Getting Started ΓòÉΓòÉΓòÉ
This section introduces PMATE and describes how to begin working with it to
automate testing of applications and systems.
o Start PMATE from the command line (by typing PMATE), or from a Workplace
Shell folder. (The Installation section describes how to create a PMATE
folder.)
On start up, the main window of PMATE is displayed. This window contains a
main menu bar and a client window which is the script editor / browser.
o Select a new script file from the File->Open pull-down menu. Enter a name in
the Open dialog box and select OK.
1. To RECORD a set of events select Action->Record. The edit window will
disappear and the Record Settings Dialog will appear. (For now simply click
on the OK button to accept the default options, later on we will discuss
this dialog in detail.)
Notice that the record icon (shown above) is presented in the lower left
corner of the screen. This icon is used to start and stop the record
session, and to select additional features of PMATE, such as marking an
area of the screen for comparison.
2. Click on the record icon and a menu appears, later we will discuss in
detail all of the record menu options. For now select the item "Fix window
position->Entire Desktop". This will record the size and position of all
active windows on the desktop.
(This is done to ensure correct placement during playback. PM applications
can, and often do, allow the PM Window Manager to display their window at
random positions on the screen.)
3. Now move the mouse around the screen and click/doubleclick on some windows
and/or icons. All of these events will be recorded as they happen.
4. When you are finished, click on the record icon again, and select "Stop".
The main edit window will reappear diplaying the newly recorded script.
(Refer to the Commands by Function section for a description of each script
command.)
Manual changes may be applied to the script at any time now. To save the
changes select File->Save from the edit window.
1. To PLAY BACK the current script, select Action->Playback from the main
PMATE window. All events in the current script will be played back.
2. Try moving any of the windows that were selected in the "Fix window
position->Entire Desktop" operation above, and then replay the script.
Windows that were moved will be automatically moved back to their original
position, before the playback continues.
ΓòÉΓòÉΓòÉ 4.1. Command line arguments ΓòÉΓòÉΓòÉ
Command line arguments are denoted by either a slash or minus (/-) preceding
the argument the options are not case sensitive.
Qualifier Description
/F filename Name of the script file to open and display in the main
script edit window. Leave a space between the /f and the
filename.
/L filename Open the logfile in append (concatinate) mode. Leave a space
between the /l and the filename.
/LA filename Open the logfile in append (concatinate) mode. Leave a space
between the /la and the filename.
/LO filename Open the logfile in overwrite mode. Any current file will be
overwritten. Leave a space between the /lo and the filename.
/A Automatic playback mode. Playback the given scriptfile
without presenting the main script edit window. PMATE returns
after execution of the passed script file/segment.
/S segment Define segment to execute (Optional for Automatic playback
mode). Leave a space between the /s and the segment name.
/R This option tells pmate_if (the server) to remain resident
after playing back the script requested. Using this feature
will speed the launching of multiple scripts / segments (See
example 2 below). It should also be noted that one may call
the pmate_if.exe program directly and not use the pmate.exe
program as a client.
/T Terminate the pmate server's resident mode. The pmate_if
server will shut down upon completion of the current script
playback request.
/W0 Logging level 0; errors only (Log screen differences, focus
failures, and script syntax errors). Focus failures are
instances were a window cannot be found during playback, but
was there during the recording of the script.
/W1 Logging level 1; above, plus any comments in the script
/W2 Logging level 2; above, plus script statements, and in-line
Time Stamps the logfile.
/?, ?, /H Display all available command line options and a brief
description.
Example 1 starts pmate from the command line with a file open for recording
and/or playing back using the interactive PMATE menu.
PMATE /F TEST.SCR
Example 2 is an example of a OS/2 command file controling a PMATE script which
has a Initialization segment, Variation segment(s) and a closing segment
Close_Windows.
@ECHO OFF
REM THIS COMMAND FILE EXECUTES THE SEGMENT INIT THEN EACH VARIATION.
REM
REM ON THE FIRST ERROR IN ANY VARIATION WE ECHO ERRORS FOUND TO THE
REM LOG FILE AND WAIT FOR THE USER TO PRESS ENTER. THEN WE TERMINATE
REM BY EXECUTING THE SEGMENT CLOSE_WINDOWS.
REM
REM IF THERE ARE NO ERRORS WE ECHO ALL PASS AND THEN EXECUTE THE SEGMENT
REM CLOSE_WINDOWS.
REM USE THE /R SWITCH TO START THE SERVER IN RESIDENT MODE
pmate /f test.scr /a /w2 /s INIT /lo test.log /r
REM SINCE WE ARE IN RESIDENT MODE THERE IS NO NEED TO GIVE THE SCRIPT
REM FILENAME AGAIN.
pmate /a /w2 /s Var1 /la test.log
IF ERRORLEVEL=1 GOTO ERRORS
pmate /a /w2 /s Var2 /la test.log
IF ERRORLEVEL=1 GOTO ERRORS
pmate /a /w2 /s Var3 /la test.log
IF ERRORLEVEL=1 GOTO ERRORS
ECHO ALL PASS >> test.log
ECHO ALL PASS
GOTO END
:ERRORS
ECHO ERRORS FOUND >> test.log
ECHO ERRORS FOUND, WE WILL CLOSE ALL WINDOWS NOW...
PAUSE
:END
REM TIME TO TERMINATE OUR TEST RUN. USE THE /T SWITCH TO REMOVE
REM THE PMATE SERVER FROM MEMORY UPON COMPLETION.
pmate /a /w2 /s Close_Windows /la test.log /t
When PMATE is used as a tool (as in the above example) it can be called from
REXX, C, or any program which can launch another application.
ΓòÉΓòÉΓòÉ 4.2. Recording ΓòÉΓòÉΓòÉ
This icon indicates that PMATE is in recording mode. All mouse click, and drag
operations, plus all keyboard input to non-full screen sessions will be
recorded to the current script file.
To initiate record, from the main edit window select record from the actions
pull-down menu. The main edit window will be closed and a record icon as shown
below will appear in the lower left corner of the window.
The record settings dialog window will come up at this point giving the user a
chance to verify / modify the record options. This dialog has options to change
the segment being used (described later), instruct PMATE to record comments
into the script by itself, automaticaly record window positions, modify the
default focus / crc / bitmap timeouts, modify the maximum delay which pmate
will record, and define file name prefix for bitmap saves.
During the record process it is recommended that any window that is to be used
in the record session be enumerated (Focus Command). In other words, note the
location and size of the window. This will ensure that subsequent playback
sessions will trigger the desired responses.
This enumeration can be done with the Auto Focus Option in the Record Settings
Dialog. Also one can manually select the windows to focus by using the Record
Button Menu Options "Fix window position->Single Window" and "Fix window
position->Entire Desktop".
Options available from the Record Button Menu are:
1) Fix window position
a) Single window
b) Entire desktop
2) Mark areas
a) CRC comparison
b) Bitmap comparison
3) Playback controls
a) Pause point
4) Add a comment
5) Record as WM_messages / Record as Script
6) Settings
7) Stop / Edit
Detailed descriptions of each of these commands can be found in this document.
ΓòÉΓòÉΓòÉ 4.3. Playback ΓòÉΓòÉΓòÉ
To playback, select playback from the actions pull-down menu. The main edit
window will be closed and a playback icon as shown below will appear in the
lower left corner of the window.
Animation will occur to indicate what is happening during the playback.
To stop playback you can press <Ctrl><Break>. PMATE will stop at the next Pause
Point, Focus, CRC, or Bitmap location in the script. During the initial phases
of creating a large script it would be wise to use many segments and/or Pause
Points to provide a easy way to exit during playback.
ΓòÉΓòÉΓòÉ 4.4. Segments ΓòÉΓòÉΓòÉ
See the definition of a Segment Label in Commands by Function-> Segment Labels.
Also the Helpful Hints section in this document for a suggested usage of
segment labels.
Why? Segments allow you to split a large test into many separate sections for
ease of design, testcase debugging, and modularity.
Segments can be added to a script by simply typing a segment label into the
script manually. During the record mode, you can one select the Record Settings
Dialog and modify the current segment label to a new label. PMATE will record
the new segment label into the script for you.
Once you have Segments in a script file you can playback the segments one at a
time from the command line or selectively from within PMATE. (See the section
on Command line arguments for an example and syntax from the command line.)
To playback a selected list of segments interactively, select Actions->Playback
Segments from the PMATE menu. Then highlight the segments you wish to execute.
Since PMATE always returns the number of errors, segments can provide a
machanism for logical operations such as looping and conditional branching.
ΓòÉΓòÉΓòÉ 5. Helpful Hints ΓòÉΓòÉΓòÉ
o Icons in WorkPlace Shell Folders:
PMATE cannot fix the position of an icon in a WorkPlace Shell folder (or
container) because folder icons are not separate windows, like the
traditional PM icons and controls.
We recommend that you create a special folder with SHADOWS of the icons you
will use for a particular testcase. You can then begin the recording session
by having PMATE fix the position and size of this folder; and then SORT the
folder to ensure that all the folder icons will be properly positioned for
the remainder of the playback.
(Icons in a folder are sorted from the folder's pop-up menu. Click with mouse
button 2 in the folder or the folder's icon on the desktop, and then select
SORT, and choose an appropriate sort option from the sort submenu.)
o Testcase Initial Conditions:
Start testcases from a blank desktop (all windows closed) to eliminate
contamination from other programs, and to make it easier to recreate the
initial conditions of the testcase.
You may wish to keep a OS/2 command window around (preferably minimized) to
launch programs or to perform command line operations.
o PMATE Segments:
Use the PMATE segment feature in your testcases. (We recommend that you add a
pause point at the beginning and end of each segment for additional visual
feedback of the progress of the playback.)
Here is a suggested testcase segment outline:
Name Usage
STARTUP For preparation and launching of the test.
VARIATION# One segment for each testcase variation.
REFRESH [Optionally] A segment which returns you to a clean state,
ready to begin the variations again without doing another
complete SHUTDOWN and STARTUP.
SHUTDOWN A segment which will return you to the pre-STARTUP state on
your desktop.
o CRC and Bitmap Comparisons:
When marking a CRC or Bitmap try to keep the marked areas WITHIN the
window(s) being tested. This will minimize the possibility of crosstalk
between elements of the desktop that are not part of the system under test.
(If any portion of the marked area is on the desktop and you have
accidentally left another window, or moved another window around, on the
desktop during playback, unnecessary comparison failure may result.)
Inadvertent CRC/Bitmap failures can occur in areas which are likely to change
from test to test. Two common situations to look out for are time-dependent
areas, such as the system clock; and directory listings in which, for
example, the number of free bytes cannot be guaranteed to remain constant.
o WM_message recording mode
PMATE has an alternative "record all messages" recording mode - WM_messages
(binary) mode. (Although it is sometimes termed a binary mode, the generated
script is still in text format.)
This mode is useful for programs where the PATH of the mouse is critical.
This includes paint programs, and even when selecting multiple icons within a
WorkPlace Shell folder. It can also be useful for 3270 emulator sessions.
If all else fails, you can try WM_messages mode, but use it sparingly,
because it will generate a huge amount of script.
o Little Known Facts - alternative uses for PMATE
1. You can use PMATE to prepare demos and tutorials for your PM
application.
Use Pause Points to create message boxes to inform the viewer what is
going to happen next, at each point in the tutorial.
2. You can use PMATE to create some unusual effects in OS/2. For example,
you could change the position and size of the WorkPlace Shell's desktop
itself:
- Start recording
- Select "Fix window position->Single window" and click on the desktop
- Immediately stop the recording
- Edit the resulting script file to change values in the the 'Focus "OS/2
2.0 Desktop" position (-1,-1) size (1026,792)' statement.
- Save the changes and play back the script.
If you have set your Desktop Settings Icon Format to "flowed", values of
0, 0, 100, 480 give an interesting effect. (But remember the original
values, so you can change them back again.)
ΓòÉΓòÉΓòÉ 6. Commands by function ΓòÉΓòÉΓòÉ
In this section, PMATE commands are separated into five functional categories.
You can obtain detailed information and the syntax for each particular command
by expanding each category in the Contents page of this reference and selecting
the appropriate command.
Each command includes the following information:
o The purpose of the command
o Command syntax diagram
o Information about using the command.
Note: For information about command diagrams, select How to Read a Syntax
Diagram
ΓòÉΓòÉΓòÉ 6.1. Script Comments ΓòÉΓòÉΓòÉ
Comment lines are any one of the following characters "/ ; # !" as the first
non-whitespace character of a script line followed by the comment text.
Comments are terminated by the end of the current line, so comments cannot span
multiple lines.
You can specify that comment lines will be output to the log file during
playback by including the /w command line option with a value of 1 or higher
(i.e. /w1). This is useful for determining where a comparison error occurred
within the script.
During a record session if one has the automatic comments switch turned on
pmate will generate a comment at the end of each selected mouse or keyboard
event. Pmate attempts to output the text of the control + the type of control
+ the window which contains the control. This feature enables comments like
the following:
// "Refresh" (BUTTON) in "PMATE RECORD DLL" (Window)
The following are examples of valid comments:
//---- Variation #1
#============================#
# testing for a valid format #
#============================#
;Starting the test now.
!.. don't forget ..
/Delay (1000)
Note: Blank lines, tab keys and spaces are all valid in a script file.
ΓòÉΓòÉΓòÉ 6.2. Segment Labels ΓòÉΓòÉΓòÉ
Segments are defined as any script line with a colon ':' as the first
non-whitespace character followed by any reasonable number of ascii chars.
Whitespace characters are not allowed IN the segment label itself (including
immediatley after the colon). Segment Labels are not case sensitive.
The following are examples of valid segment labels:
:INITIALIZE
:Variation_Number1
:Close
See the Helpful Hints section in this document for a suggested usage of
segment labels. Also read the Getting Started with Segments section for a
description of how to record/playback segments. See the section on Command line
arguments for a example and syntax from the command line.
ΓòÉΓòÉΓòÉ 6.3. How to Read a Syntax Diagram ΓòÉΓòÉΓòÉ
A syntax diagram shows you how to enter a command so that the PMATE system can
correctly interpret the command. PMATE automatically generates all of the
commands for you. Therefore purpose of these diagrams is to provide
documentation for the users who will be manually modifying/creating the PMATE
script files. When viewing a syntax diagram, read from left to right and from
top to bottom. The command name and items required to make the command work
appear on the baseline; the items below the baseline are optional. A line
ending with an arrowhead means that the diagram is continued. A line starting
with an arrowhead means that the syntax is continued from the previous line. A
vertical bar marks the end of the command syntax.
Parameters are classified as keywords, parameters, or a combination of both. A
keyword has a predefined value. It appears in mixed case letters and must be
typed exactly as shown. A command name is a keyword. Parameters represent names
or values you supply. They are shown in lowercase letters, but may be entered
in any case. A file name is a variable. Include all punctuation shown in the
diagram, such as colons, semicolons, commas, quotation marks, and equal signs.
Specify a Sequence More Than Once: An arrow below the main path that returns to
a previous point means the sequence of items included by the arrow can be
specified more than once.
TYPE ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇ filename ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöñ
ΓööΓöÇ drive ΓöÇΓöÿ ΓööΓöÇ path ΓöÇΓöÿ Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Specify Items Once in Any Order: A stack of parameters with a return arrow
above the main path indicates one or more parameters can be specified in any
order, but each parameter can be specified only once.
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇ CHKDSK ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓööΓöÇ drive ΓöÇΓöÿ ΓööΓöÇ path ΓöÇΓöÿ ΓööΓöÇ drive ΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö┤ΓöÇΓöÇΓöñ
ΓööΓöÇ path ΓöÇΓöÿ ΓööΓöÇ filename ΓöÇΓöÿ Γö£ΓöÇ /F ΓöÇΓöñ Γö£ΓöÇ /C ΓöÇΓöÇΓöÇΓöñ
ΓööΓöÇ /V ΓöÇΓöÿ ΓööΓöÇ /F:n ΓöÇΓöÿ
Choose One Item from a Stack: A stack of parameters with no return arrow means
that you cannot choose more than one from the stack.
ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöÇΓöÇ Click ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇ1ΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼Γö┤Γö¼<ALT>ΓöÇΓöÇΓö¼Γö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γöé ΓöéΓöé ΓöéΓö£ΓöÇ2ΓöÇΓöñ Γöé Γöé Γö£<SHIFT>Γöñ
ΓööwithΓöÿΓööbuttonΓöÿΓööΓöÇ3ΓöÇΓöÿ ΓööandΓöÿ Γöö<CTRL>ΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇ(x,y)ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöñ
ΓööatΓöÿ ΓööreleaseΓöÿΓööafterΓöÿΓöö(x)ΓöÿΓöömillisecondsΓöÿ
Choose One Item from within a Stack: Some diagrams show a stack of parameters
within another stack. If the inner stack has no return arrow and the outer
stack has a return arrow above the main path, you can choose only one parameter
from the inner stack. That parameter can be combined (in any order) with any of
the parameters from the outer stack.
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇ PRINT ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö┤ΓöÇΓöÇ
ΓööΓöÇ drive ΓöÇΓöÿ ΓööΓöÇ path ΓöÇΓöÿ Γö£ΓöÇ /D:device ΓöÇΓöñ
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇ /B ΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ filename ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼Γö┤Γöñ
ΓööΓöÇ drive ΓöÇΓöÿΓööΓöÇ path ΓöÇΓöÿ Γöé Γöé Γö£ΓöÇ /C ΓöÇΓöñ Γöé
Γöé Γöé Γöé ΓööΓöÇ /T ΓöÇΓöÿ Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ ΓööΓöÇ /D:device ΓöÇΓöÿ
In this example, you can specify /D:device and /C once in any order, or you can
specify /D:device and /T once in any order, but you cannot specify /C and /T
together.
ΓòÉΓòÉΓòÉ 6.4. Mouse ΓòÉΓòÉΓòÉ
Mouse movement is controlled by a set of four commands: Click, Doubleclick,
Drag and Chord. These commands give the ability to use menus, move windows,
select objects, bring up the task list, etc.
ΓòÉΓòÉΓòÉ 6.4.1. Click ΓòÉΓòÉΓòÉ
ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöÇΓöÇ Click ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇ1ΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼Γö┤Γö¼<ALT>ΓöÇΓöÇΓö¼Γö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γöé ΓöéΓöé ΓöéΓö£ΓöÇ2ΓöÇΓöñ Γöé Γöé Γö£<SHIFT>Γöñ
ΓööwithΓöÿΓööbuttonΓöÿΓööΓöÇ3ΓöÇΓöÿ ΓööandΓöÿ Γöö<CTRL>ΓöÇΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇ(x,y)ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöñ
ΓööatΓöÿ ΓööreleaseΓöÿΓööafterΓöÿΓöö(x)ΓöÿΓöömillisecondsΓöÿ
Click emulates pressing any one of the three mouse buttons at any screen
coordinate. This may be used to select menu options or respond to dialog boxes
etc.
Script Examples:
Click with button 1 at ( 124, 87 ) release after (94) milliseconds
Click 2 ( 67, 222 ) (20)
ΓòÉΓòÉΓòÉ 6.4.2. Doubleclick ΓòÉΓòÉΓòÉ
ΓöÇΓöÇ DoubleClick ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇ1ΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇ(x,y)ΓöÇΓöÇΓöñ
Γöé ΓöéΓöé ΓöéΓö£ΓöÇ2ΓöÇΓöñ ΓööatΓöÿ
ΓööwithΓöÿΓööbuttonΓöÿΓööΓöÇ3ΓöÇΓöÿ
Doubleclick emulates a double click operation with the mouse. Any of the three
mouse buttons may be used for the double click.
The position of the mouse pointer at the time of the doubleclick is specified
in screen coordinates.
It should be noted that sometimes on slower or more taxed machines a
doubleclick will require the window which is to receive the doubleclick to be
the active window. This can be acomplished by using either the focus command
followed by a delay, or by clicking on the title bar of the window where the
doubleclick is going to occur.
Script Examples:
Doubleclick with button 1 at ( 124, 87 )
Doubleclick 2 ( 67, 222 )
ΓòÉΓòÉΓòÉ 6.4.3. Drag ΓòÉΓòÉΓòÉ
ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöÇΓöÇ Drag ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇ1ΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼Γö┤Γö¼<ALT>ΓöÇΓöÇΓö¼Γö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γöé ΓöéΓöé ΓöéΓö£ΓöÇ2ΓöÇΓöñ Γöé Γöé Γö£<SHIFT>Γöñ
ΓööwithΓöÿΓööbuttonΓöÿΓööΓöÇ3ΓöÇΓöÿ ΓööandΓöÿ Γöö<CTRL>ΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ ( x1 , y1 ) ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ ( x2 , y2 ) ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓööΓöÇ from Γöÿ ΓööΓöÇ to Γöÿ
ΓòÉΓòÉΓòÉ 6.4.4. Chord ΓòÉΓòÉΓòÉ
ΓöÇΓöÇ Chord ΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇ(x,y)ΓöÇΓöÇΓöñ
ΓööatΓöÿ
Chord emulates the pressing of both the left and right buttons on a mouse at
the same time. This action brings up the OS/2 Window List. The window list can
also be brought up by typing <CTRL><ESC>.
Note the Chord command will only work if it is done on a blank portion of the
desktop (ie: a portion not covered by a Window or Icon.
The position of the mouse pointer at the time of the chord is specified in
screen coordinates.
Script Example:
Chord at (124,87)
Chord (67,222)
ΓòÉΓòÉΓòÉ 6.5. Keyboard ΓòÉΓòÉΓòÉ
Keyboard input is simulated by the Key and VioKey commands. Characters to be
displayed in PM applications are processed with the Key command, while
characters intended for windowed command sessions use the VioKey command.
Strings of ASCII characters are enclosed in double quotes. Modified characters
such as ALT-A are each processed as a separate key command. special function
keys such as: Insert, Delete, Page Up, Page Down, F1...F12, etc. are also only
be processed as separate single key commands.
A quoted string should not exceed 60 characters, for readability reasons.
Quoted strings are automatically split at the most convenient location by the
record system in order to not extend past the edge of the edit window.
ΓòÉΓòÉΓòÉ 6.5.1. Key ΓòÉΓòÉΓòÉ
ΓöÇΓöÇΓöÇΓöÇ Key ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γöé ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ ΓöîΓöÇ keyname ΓöÇΓöÇΓöÉ Γöé
ΓööΓöÇΓöÇΓö┤ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö┤ΓöÇΓöÇΓöñ Γö£ΓöÇΓöÇΓöÇΓöÿ
Γö£ <CTRL> ΓöÇΓöñ Γöö ASCII key ΓöÇΓöÿ
Γö£ΓöÇ <ALT> ΓöÇΓöñ
Γöö <SHIFT> Γöÿ
ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ Γöé
ΓööΓöÇΓöÇΓöÇ " ΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇ ASCII key ΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇ " ΓöÇΓöÇΓöÇΓöÿ
Keystrokes for a Presentation Manager window are processed with this command.
Note: Within the quotes \\ is converted to \ and \" is converted to ".
Key "This is some UPPER and lower case text"
The text in double quotes will be placed at the cursor position in the active
window, with case preserved.
Key <ALT>F
Assuming the active window has a menu bar, the file menu will appear.
Key <CTRL><ALT><SHIFT>O
An example of a multi-key combination.
ΓòÉΓòÉΓòÉ 6.5.2. VioKey ΓòÉΓòÉΓòÉ
ΓöÇΓöÇΓöÇ VioKey ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
Γöé ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ ΓöîΓöÇ keyname ΓöÇΓöÇΓöÉ Γöé
ΓööΓöÇΓöÇΓö┤ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö┤ΓöÇΓöÇΓöñ Γö£ΓöÇΓöÇΓöÇΓöÿ
Γö£ <CTRL> ΓöÇΓöñ Γöö ASCII key ΓöÇΓöÿ
Γö£ΓöÇ <ALT> ΓöÇΓöñ
Γöö <SHIFT> Γöÿ
ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓööΓöÇΓöÇΓöÇ " ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇ ASCII key ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇ " ΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Keystrokes for a windowed command session are handled by this command.
VioKey "dir"
VioKey <ENTER>
It is assumed that focus is set on an OS/2* window ready to accept input at the
command prompt. A directory listing will begin to scroll by in the window.
ΓòÉΓòÉΓòÉ 6.5.3. Special Keys ΓòÉΓòÉΓòÉ
Listed below are the correct designations for each of the special keys found on
a standard keyboard. Each mnemonic has to be enclosed in angled brackets, and
is self-explanatory.
o Key Modifiers
- <CTRL>
- <ALT>
- <SHIFT>
o Cursor Movement Keys
- <PGUP>
- <PGDN>
- <HOME>
- <END>
- <UP>
- <DOWN>
- <LEFT>
- <RIGHT>
o Special Use Keys
- <SCRLOCK>
- <NUMLOCK>
- <CAPSLOCK>
- <ESC>
- <TAB>
- <BACK_TAB>
- <ENTER>
- <NUMPAD_ENTER>
- <BKSP>
- <SPACE>
- <PRTSCR>
- <PAUSE>
- <INSERT>
- <DELETE>
o Function Keys
- <F1>
- <F2>
- <F3>
- <F4>
- <F5>
- <F6>
- <F7>
- <F8>
- <F9>
- <F10>
- <F11>
- <F12>
ΓòÉΓòÉΓòÉ 6.6. Graphics ΓòÉΓòÉΓòÉ
Coordinates are all specified in terms of absolute screen coordinates where the
origin is the lower left hand corner. X values increase from left to right, Y
values increase from bottom to top.
Video comparisons may be accomplished in two ways:
o A CRC comparison calculates a single value representing the marked screen
area. Current calculated and recorded values are compared for exact equality.
CRC captures only indicate if the original region is correct, with no
indication of what any differences may be. However, as a single value held
within the script file, disk storage is minimized.
When a difference is detected (and we are not in automatic playback mode),
the current region will be highlighted along with a dialog box requesting to
accept or reject the change in CRC value.
Rejection of the difference will result in a failure of the comparison. If
the difference is acceptable, the current CRC value will be incorporated into
the script file, for use in subsequent test runs.
o Bitmap comparisons require the recorded section of the screen be stored on
disk. Current and recorded images are compared for exact equality.
Bitmap captures require additional storage resources, but offer the benefit
of being able to compare the recorded region to the current region, so that
differences from test to test may be noted exactly.
When a difference is detected (and we are not in automatic playback mode),
the recorded bitmap will be displayed to the immediate right of the current
region (both in movable windows). A dialog box requesting to accept or reject
the differences in the two images will also be displayed.
Rejection of the difference will result in a failure of the comparison. If
the difference is acceptable, the current region will be saved to disk to
replace the recorded bitmap region and the comparison will be considered to
have been successful.
All changes to CRC and Bitmap compares are noted in the script file, together
with the date and time at which the change occured.
If a CRC or Bitmap compare fails, the error is sent to the user-defined log
file.
ΓòÉΓòÉΓòÉ 6.6.1. Bitmap compare ΓòÉΓòÉΓòÉ
ΓöÇΓöÇ Bitmap ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼(x,y,cx,cy)Γö¼ΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ"filename"ΓöÇΓöÇ
ΓööcompareΓöÿΓöörectangleΓöÿ ΓööwithΓöÿΓööfileΓöÿ
Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöñ
ΓöörepeatΓöÿΓöö(count)ΓöÿΓöötimes at intervals ofΓöÿΓöö(t)ΓöÿΓöömillisecondsΓöÿ
Compare the bitmap of the indicated region of the active screen to a previously
recorded bitmap stored on disk. Until the test passes, do this count times with
a (t) time interval between each test. Note, the smaller the time interval the
more time slice PMATE will require to do the comparisons.
When a difference is detected (and we are not in automatic playback mode), the
recorded bitmap and the current region will be displayed along with a dialog
box requesting to accept or reject the differences in the two images.
If accepted, playback continues and the current bitmap will replace the old one
on disk. Rejecting the failure will log an error in the logfile.
When a difference is detected in automatic playback mode, pmate stores the bad
bitmap to disk for subsequent investigation using a separate bitmap viewer
utility. The bad bitmap filename used is the same as the good bitmap's name
with a .bad extention.
Example:
Bitmap compare rectangle ( 169, 327, 216, 372 ) with file "testhand.bmp"
repeat (10) times at intervals of (1000) milliseconds
ΓòÉΓòÉΓòÉ 6.6.2. CRC compare ΓòÉΓòÉΓòÉ
ΓöÇΓöÇ CRC ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼(x,y,cx,cy)Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼(crcvalue)ΓöÇ
ΓööcompareΓöÿΓöörectangleΓöÿ Γööwith resultΓöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöñ
ΓöörepeatΓöÿΓöö(count)ΓöÿΓöötimes at intervals ofΓöÿΓöö(t)ΓöÿΓöömillisecondsΓöÿ
A CRC value will be calculated for the given rectangular region of the screen,
and that value will be compared to the indicated value. If there is a match
playback continues. Until the test passes, do this count times with a (t) time
interval between each test. Note, the smaller the time interval the more time
slice PMATE will require to do the comparisons.
In the case of a mismatch (and we are not in automatic playback mode), the user
is be presented with a message box noting the comparison failure. At this point
the difference may be accepted or rejected.
If accepted, playback continues and the new CRC value is automatically updated
in the script. Rejecting the failure will place a failure entry in the log
file.
When a difference is detected in automatic playback mode, pmate stores the bad
bitmap to disk for subsequent investigation using a separate bitmap viewer
utility. The CRC saves are done to the file CRC?????.BAD and the file name is
placed in the log file.
Example:
CRC compare rectangle (69,433,582,475) with result (125003691)
repeat (10) times at intervals of (100) milliseconds
ΓòÉΓòÉΓòÉ 6.6.3. Display resolution ΓòÉΓòÉΓòÉ
ΓöÇΓöÇΓöÇΓöÇ Display ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ (x,y) ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓööΓöÇ resolution ΓöÇΓöÿ
Screen resolution of the recorded system.
Example:
Display resolution (1024,768) High resolution
Display resolution (640,480) Standard VGA
ΓòÉΓòÉΓòÉ <hidden> Point ΓòÉΓòÉΓòÉ
Coordinates (Points) are all specified in terms of absolute screen coordinates
where the origin is the lower left hand corner. X values increase from left to
right, Y values increase from bottom to top.
ΓòÉΓòÉΓòÉ 6.7. Control ΓòÉΓòÉΓòÉ
The Delay command forces a pause to occur on the system during playback.
The Focus command waits for and positions windows during playback.
The Pause command provides for interaction with the desktop during playback.
ΓòÉΓòÉΓòÉ 6.7.1. Delay ΓòÉΓòÉΓòÉ
ΓöÇΓöÇΓöÇΓöÇ Delay ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ( time ) ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöö milliseconds Γöÿ
Set a delay time, or pause in the script.
Note: The initial delay recorded in the script will be the delay which
actually occurred during the recording of the script, modified by the maximum
delay selected from the Record Settings dialog. You can make this delay larger
or smaller, but you must take care that the delay was not necessary.
Also note that on a slower system delays may need to be larger. It is
recommended that you record your initial script on the slowest machine.
VioKey "dir > test.dir"
VioKey <ENTER>
Delay (1000) milliseconds
VioKey "print test.dir"
VioKey <ENTER>
This delay command will cause a 1 second delay during playback between the
VioKey commands.
ΓòÉΓòÉΓòÉ 6.7.2. Focus ΓòÉΓòÉΓòÉ
ΓöÇΓöÇ Focus "name" ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼(x,y)ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼(cx,cy)Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼
ΓööpositionΓöÿ ΓöösizeΓöÿ ΓöörepeatΓöÿΓöö(count)Γöÿ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöñ
Γöötimes at intervals ofΓöÿΓöö(t)ΓöÿΓöömillisecondsΓöÿΓöö(SWP_ACTIVATE-)Γöÿ
Set the size and position of a window specified by "name". PMATE will select
the first window it finds on top of the window list.
Until the window is found, search count times with a (t) time interval between
each search. Note, the smaller the time interval the more time slice PMATE will
require to do the searches.
(SWP_ACTIVATE-) is a flag which tells PMATE to size and position the requested
window but to leave it at its current location in the window ordering. This is
sometimes called the Z-Order of a window. The default is SWP_ACTIVATE which
will pop the window designated to the top of all other windows. When recording
a script PMATE records in SWP_ACTIVATE mode for all manual focus calls (Fix
window position->Single window and/or ->Entire Destop). When recording with the
Auto Focus Button switched on, all automatic focus commands are recorded with
SWP_ACTIVATE-.
During record mode Auto Focus is a proactive focus. If the auto focus switch is
turned on, each time the user performs an action PMATE will determine if the
action occured on a un-focused window. If this is a new window or the size of
the window has changed PMATE records the new window size and position to the
script file.
During playback pmate records any failures to execute the focus command. If the
window can be moved but not to the correct size / location, pmate records to
the log file the size / location it was able to set it to. This enables one to
fix the script to focus to the correct location without incurring the warning
message or the time delay during playback.
ΓòÉΓòÉΓòÉ 6.7.3. Pause ΓòÉΓòÉΓòÉ
ΓöÇΓöÇ Pause ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ"Message Text" ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼(milliseconds)ΓöÇΓöÇ
ΓööMessageΓöÿ ΓööDelayΓöÿ
ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼(BELL)Γö¼Γö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼ΓöÇΓöÇ(x,y)ΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö¼(x,y)ΓöÇΓö¼ΓöÇΓöñ
ΓööSoundΓöÿΓöö(NONE)ΓöÿΓööLocationΓöÿΓöö(CENTERED)Γöÿ ΓööHot PointΓöÿΓöö(NONE)Γöÿ
This command introduces a "PAUSE POINT" during playback of a PMATE script. The
effect of a pause point is that a message box is displayed containing the
specified message text. The message box remains on the screen until a countdown
timer of specified duration elapses, or until the user intervenes.
The pause command gives PMATE the ability to act as a demonstration or
tutorial; give the user feedback; issue a series of instructions; act as a
stop-watch; or create points in the script where playback can be interrupted.
(The stop-watch feature uses pause points in conjunction with the /w2 logfile
command line option.)
The following example will display a pause point message box, ring the bell,
and wait 1000000 milliseconds (about 16 minutes) before continuing. The user
may continue the script at any time, wait for the count down to finish, or
abort the playback.
Pause Message "Hello, we are going to launch" Delay(1000000) Sound(BELL) Location(68,417) Hot Point(351,715)
The following example is good for providing a time stamp and / or for creating
a (<CTRL><BREAK>) breakout location in the script.
Pause Message "" Delay(0) Sound(NONE) Location(68,417) Hot Point(351,715)
The delay time can extend up to 999999999 milliseconds (277 hours 47 min or 11
1/2 days).
ΓòÉΓòÉΓòÉ 6.8. WM_message (binary) Mode ΓòÉΓòÉΓòÉ
ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ WM_n ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ MP1(n) ΓöÇΓöÇ MP2(n) ΓöÇΓöÇ DELAY(n) ΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇΓöÇΓöÇΓöÇ WM_CHAR ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇΓöÇΓöÇ WM_VIOCHAR ΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇ WM_BUTTON1DOWN ΓöÇΓöñ
Γö£ΓöÇΓöÇ WM_BUTTON1UP ΓöÇΓöÇΓöñ
Γö£ΓöÇ WM_BUTTON2DOWN ΓöÇΓöñ
Γö£ΓöÇΓöÇ WM_BUTTON2UP ΓöÇΓöÇΓöñ
Γö£ΓöÇ WM_BUTTON3DOWN ΓöÇΓöñ
Γö£ΓöÇΓöÇ WM_BUTTON3UP ΓöÇΓöÇΓöñ
ΓööΓöÇΓöÇ WM_MOUSEMOVE ΓöÇΓöÇΓöÿ
n = any valid hex / octal / or decimal value
After selecting the "Record as WM_messages" option from the record menu, PMATE
will record every single WM_ message generated by the system. This includes all
mouse moves and any special keystroke / mouse combinations.
Warning: This will create a very large script file very quickly. If the file
gets too large you will have to use another editor like EPM to manage the
script. It is suggested you use the binary mode sparingly, and switch back to
the "Record as Script" mode absolutely as soon as possible.
The following is a recording which moves the mouse to a location on the desktop
where there is an OS/2 command window; clicks on the window; then types the
command "dir" followed by the <ENTER> key. By comparison, the example is
followed by a Script example which performs the same steps.
Focus "OS/2 Window" position (292,313) size (648,430) repeat (10) times at intervals of (1000) milliseconds
Recorded as "WM_messages":
WM_MOUSEMOVE MP1(0x00cb0181) MP2(0x00000000) DELAY(0x00000000)
WM_MOUSEMOVE MP1(0x010501f3) MP2(0x00000000) DELAY(0x0000003e)
WM_MOUSEMOVE MP1(0x010a01f2) MP2(0x00000000) DELAY(0x00000119)
WM_MOUSEMOVE MP1(0x011a0213) MP2(0x00000000) DELAY(0x00000020)
WM_MOUSEMOVE MP1(0x012802a8) MP2(0x00000000) DELAY(0x0000001f)
WM_MOUSEMOVE MP1(0x012d0301) MP2(0x00000000) DELAY(0x00000000)
WM_MOUSEMOVE MP1(0x012e0302) MP2(0x00000000) DELAY(0x0000005e)
WM_MOUSEMOVE MP1(0x012e0303) MP2(0x00000000) DELAY(0x0000001f)
WM_MOUSEMOVE MP1(0x012a02fd) MP2(0x00000000) DELAY(0x000000db)
WM_MOUSEMOVE MP1(0x012e02ff) MP2(0x00000000) DELAY(0x0000001f)
WM_MOUSEMOVE MP1(0x013c0314) MP2(0x00000000) DELAY(0x0000001f)
WM_MOUSEMOVE MP1(0x014e0328) MP2(0x00000000) DELAY(0x0000001f)
WM_MOUSEMOVE MP1(0x015d0334) MP2(0x00000000) DELAY(0x00000000)
WM_MOUSEMOVE MP1(0x01680344) MP2(0x00000000) DELAY(0x00000020)
WM_MOUSEMOVE MP1(0x016c034b) MP2(0x00000000) DELAY(0x0000001f)
WM_MOUSEMOVE MP1(0x016c034c) MP2(0x00000000) DELAY(0x0000001f)
WM_MOUSEMOVE MP1(0x016d034f) MP2(0x00000000) DELAY(0x0000001f)
WM_MOUSEMOVE MP1(0x016d0351) MP2(0x00000000) DELAY(0x0000003f)
WM_MOUSEMOVE MP1(0x016d0361) MP2(0x00000000) DELAY(0x0000003e)
WM_MOUSEMOVE MP1(0x016d0368) MP2(0x00000000) DELAY(0x00000000)
WM_MOUSEMOVE MP1(0x016d0369) MP2(0x00000000) DELAY(0x00000020)
WM_BUTTON1DOWN MP1(0x016d0369) MP2(0x000083fe) DELAY(0x0000007d)
WM_MOUSEMOVE MP1(0x016d0369) MP2(0x00000000) DELAY(0x0000001f)
WM_BUTTON1UP MP1(0x016d0369) MP2(0x000003fe) DELAY(0x0000003e)
WM_MOUSEMOVE MP1(0x016c0368) MP2(0x00000000) DELAY(0x00000020)
WM_MOUSEMOVE MP1(0x01680361) MP2(0x00000000) DELAY(0x0000001f)
WM_MOUSEMOVE MP1(0x0164035f) MP2(0x00000000) DELAY(0x0000001f)
WM_MOUSEMOVE MP1(0x0163035d) MP2(0x00000000) DELAY(0x00000000)
WM_VIOCHAR MP1(0x20011004) MP2(0x00002064) DELAY(0x00000252)
WM_0x0000007c MP1(0x00000002) MP2(0x0001002a) DELAY(0x00000000)
WM_0x0000007c MP1(0x00000002) MP2(0x00000036) DELAY(0x00000000)
WM_0x0000007c MP1(0x00000002) MP2(0x0001001d) DELAY(0x00000000)
WM_0x0000007c MP1(0x00000002) MP2(0x0000005b) DELAY(0x00000000)
WM_0x0000007c MP1(0x00000002) MP2(0x00000038) DELAY(0x00000000)
WM_0x0000007c MP1(0x00000002) MP2(0x0000005e) DELAY(0x00000000)
WM_0x0000007c MP1(0x00000002) MP2(0x00000054) DELAY(0x00000000)
WM_VIOCHAR MP1(0x17011004) MP2(0x00001769) DELAY(0x0000003e)
WM_0x0000007c MP1(0x00000002) MP2(0x0000002a) DELAY(0x00000000)
WM_0x0000007c MP1(0x00000002) MP2(0x00000036) DELAY(0x00000000)
WM_0x0000007c MP1(0x00000002) MP2(0x0000001d) DELAY(0x00000000)
WM_0x0000007c MP1(0x00000002) MP2(0x0000005b) DELAY(0x00000000)
WM_0x0000007c MP1(0x00000002) MP2(0x00000038) DELAY(0x00000000)
WM_0x0000007c MP1(0x00000002) MP2(0x0000005e) DELAY(0x00000000)
WM_0x0000007c MP1(0x00000002) MP2(0x00000054) DELAY(0x00000000)
WM_VIOCHAR MP1(0x13011004) MP2(0x00001372) DELAY(0x00000020)
WM_0x0000007c MP1(0x00000002) MP2(0x0000002a) DELAY(0x00000000)
WM_0x0000007c MP1(0x00000002) MP2(0x00000036) DELAY(0x00000000)
WM_0x0000007c MP1(0x00000002) MP2(0x0000001d) DELAY(0x00000000)
WM_0x0000007c MP1(0x00000002) MP2(0x0000005b) DELAY(0x00000000)
WM_0x0000007c MP1(0x00000002) MP2(0x00000038) DELAY(0x00000000)
WM_0x0000007c MP1(0x00000002) MP2(0x0000005e) DELAY(0x00000000)
WM_0x0000007c MP1(0x00000002) MP2(0x00000054) DELAY(0x00000000)
WM_VIOCHAR MP1(0x20011044) MP2(0x00402064) DELAY(0x0000003e)
WM_VIOCHAR MP1(0x17011044) MP2(0x00401769) DELAY(0x00000000)
WM_VIOCHAR MP1(0x13011044) MP2(0x00401372) DELAY(0x0000001f)
WM_VIOCHAR MP1(0x1c010004) MP2(0x00001c0d) DELAY(0x0000003f)
WM_0x0000007c MP1(0x00000002) MP2(0x0000002a) DELAY(0x00000000)
WM_0x0000007c MP1(0x00000002) MP2(0x00000036) DELAY(0x00000000)
WM_0x0000007c MP1(0x00000002) MP2(0x0000001d) DELAY(0x00000000)
WM_0x0000007c MP1(0x00000002) MP2(0x0000005b) DELAY(0x00000000)
WM_0x0000007c MP1(0x00000002) MP2(0x00000038) DELAY(0x00000000)
WM_0x0000007c MP1(0x00000002) MP2(0x0000005e) DELAY(0x00000000)
WM_0x0000007c MP1(0x00000002) MP2(0x00000054) DELAY(0x00000000)
WM_VIOCHAR MP1(0x1c010144) MP2(0x00401c0d) DELAY(0x0000005e)
Recorded as "Script":
Click with button 1 at (591,454) release after (218) milliseconds
Delay (1563) milliseconds
VioKey "dir"
VioKey <ENTER>
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
OS/2, Presentation Manager, and IBM are Trademarks of the IBM corporation
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Copyright IBM corporation
Copyright CI, Software and Graphic Arts, Inc.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
"Filename" specifies the complete name of the file to use for the bitmap
comparison, including the drive and directory where the file is located.
If the drive and path are not specified, the current directory is assumed.