Corrections for "Microsoft Test for Windows User's Guide"

ID Number: Q83235

1.00

WINDOWS

docerr

Summary:

Below are corrections for documentation errors in the "Microsoft Test

for Windows User's Guide" and in the online Help file MSTEST.HLP

This master list of corrections includes and adds to the correction

list found in "Part 2: Notes for the User's Guide" of the README.WRI

file shipped with the product. Please use the article below as your

master list for making corrections to the manual.

This information applies to Microsoft Test version 1.0 for Windows.

More Information:

Corrections to "Microsoft Test for Windows: Version 1.0: User's Guide"

----------------------------------------------------------------------

(Online Help only)

In the Online help only, the example for the CmpWindow function

has a misplaced quotation mark, as follows:

'$DEFINE TESTDLGS '

$INCLUDE 'MSTEST.INC'

This should be changed to read as follows:

'$DEFINE TESTDLGS

'$INCLUDE 'MSTEST.INC'

(This is correctly shown in the User's Guide.)

(Page 43) Regarding the Pause Threshhold:

In Figure 4.6 Script Window, the Pause Threshold value should be

2000 instead of 2.

The text incorrectly states that the pause threshold within the

recorder can be set to 0. The actual minimum value for the pause

threshold is 55 (milliseconds) (see the README.WRI file).

(Page 49)

The text incorrectly states that COMMAND$ returns the entire

command-line used to start TestDrvr. Rather, it will return the

first token following the /C option in the command line if present.

Otherwise, COMMAND$ will contain the string assigned to it in the

TestDrvr.INI file on the "Cmd=" line. See page 55 for the syntax of

the /C switch (from README.WRI file).

(Page 96) The listed procedure names

XFileNotExist and XDeleteFileIfExist

should be changed to

XFileNotExists and XDeleteFileIfExists, respectively

(Pages 105, 106)

All references to LEFT, MIDDLE and RIGHT should be replaced by the

constants LBUTTON, MBUTTON, and RBUTTON, respectively. LEFT and

RIGHT are reserved words and should not be used as constants.

The FastTest examples for the mouse routines show the constant

LEFT, which is a reserved word. The LBUTTON constant should be used

instead. (The README.WRI file only mentions LEFT correction.)

(Pages 121, 123, 124, 126, 127, 128, 129, 133, 134, and in the online

Help)

The syntax and the example for the following functions incorrectly

use the word Exists, which is a reserved word: BButtonExists (page

121), BCheckboxExists (page 123), BComboBoxExists (page 124),

BComboBoxItemExists (page 124), BEditTextExists (pages 126, 127),

BListBoxExists (page 128), BListBoxItemExists (page 129),

BOptionButtonExists (pages 133, 134).

For all of these functions, Exists% should be changed to another

variable name, such as Return%. For example:

Exists% = BbuttonExists("OK")

Exists% is a reserved word and should be changed to another

variable name, such as the following:

Return% = BButtonExists("OK")

(Page 198 and online Help)

The Xstartapp Example has a syntax error. The line

XstartApp "Write.Exe"

should be changed to read as follows:

XstartApp "Write.Exe", ""

(Page 241)

TestBasic "File Input and Output" source code example, middle of

the page:

INPUT #infile, StringVar

should be changed to read as follows:

LINE INPUT #infile, StringVar

(Page 286)

The following incorrect comment in the Sub ExitApp

DoKeys "%fx" '*** Send CTRL+F+X to the program to exit

should be changed to read as follows:

DoKeys "%fx" '*** Send ALT+F+X to the program to exit

(Pages 339, 347, 348, 349)

In the example programs for fCompScreen, fDumpScreen,

fDumpScreenActivate, and fDumpSrnToClip, the following statement is

incorrect, and will give a "Type identifier expected" error message

on SrnReg (because SrnReg is not defined in the include files):

Dim CurSrnReg as SrnReg

This statement should be changed to read as follows:

Dim CurSrnReg as wRect

(Pages 415, 431, 465, 497, and in the online Help for the functions

named below). The following line is incorrect:

WstaticSetClass "ThunderLabel"

in the example for each of the following functions:

WStaticSetClass (Page 497), WListSetClass (Page 465),

WComboSetClass (Page 415), WEditSetClass (Page 431)

The Window Text for Visual Basic labels (Class ThunderLabel) is

always NULL(""). This prevents any of the function examples for

WListSetClass, WComboSetClass, and WEditSetClass from working

because regardless of what text appears in a Visual Basic label,

the WindowText which is used by these examples will not be found.

The examples should be changed to read as follows:

(page 415)

WStaticSetClass "NewStaticTextClass"

WComboSetClass "NewComboSetClass"

(page 431)

WStaticSetClass "NewStaticTextClass"

WEditSetClass "NewEditClass"

(page 465)

WStaticSetClass "NewStaticTextClass"

WListSetClass "NewListClass"

(page 497)

WStaticSetClass "NewStaticTextClass"

(Page 444 and in the online Help file MSTEST.HLP)

The following syntax for WGetInfo is incorrect

Syntax: REM $DEFINE W_WINDOW

REM $INCLUDE 'MSTEST.INC'

and should be changed to read as follows:

Syntax: REM $DEFINE TESTCTRL

REM $INCLUDE 'MSTEST.INC'

For the WGetInfo procedure's Parameters section, the INFO structure

should be changed to read as follows:

Type INFO '<- changed

hWnd As Integer

hWndParent As Integer

szClass As String * MAX_CAPTION

szCaption As String * MAX_CAPTION

szParentClass As String * MAX_CAPTION

szParentCaption As String * MAX_CAPTION

szModuleName As String * MAX_CAPTION

lStyle As Long

fChild As Integer

wID As Integer

wLeft As Integer '<- changed

wTop As Integer '<- changed

wRight As Integer '<- changed

wBottom As Integer '<- changed

wWidth As Integer '<- changed

wHeight As Integer '<- changed

End Type

As shown above, the user defined type WNDINFO should be type INFO,

and Left, Top, Right, Bottom, Width, and Height need to be

prefaced with a 'w'.

(Page 445)

The example of WGetInfo at the top of the page is missing a DEFINE

statement; please change the following:

' $INCLUDE 'MSTEST.INC'

to the following:

' $Define TESTCTRL

' $INCLUDE 'MSTEST.INC'

The following line, in the "Syntax" section of the explanation of

WGetText and GetText in the middle of the page, is incorrect:

REM $DEFINE W_WINDOW

and should be changed to read as follows:

REM $DEFINE TESTCTRL

The Example for the GetText and WGetText functions at the bottom

of the page is missing a DEFINE statement, and should be changed

to read as follows:

'$DEFINE W_MISC

'$INCLUDE 'MSTEST.INC'

print GetText(0)

(Page 536)

The following sentence is incorrect

The function returns a value greater than 32 if the process

was successfully spawned.

and should be changed to read as follows:

The function returns a value of zero (0) if the process

was successfully spawned.

Also, add the following section after the third sentence in

the Comments section for the RUN function:

The return codes of the RUN function are identical to those used

for the Windows API call WinExec, except for a return code of 0.

A return code of 0 from the Microsoft Test RUN function actually

indicates success, whereas a return code of 0 indicates an "Out

of memory" error when returned from the Windows API call

WinExec.

(Page 541) (and in the online Help, MSTEST.HLP, under the TIMER function)

The following description for the TIMER function is incorrect

The TIMER function gives the number of seconds (in

hundredths) since midnight.

and should be changed to read as follows:

The TIMER function gives the number of milliseconds since

Windows was started.

Because the TIMER function returns a LONG integer, the following

syntax example is incorrect

Ret% = TIMER

and should be changed to read as follows:

Ret& = TIMER

(Chapter 10, "MSTest Procedure Reference", pages 307-500; additional

documentation from the README.WRI file)

When a script is sending keystrokes to close an application, the

situation may arise where the keystrokes are sent to the Test

Driver itself instead of the application being tested. If this

happens, a deadlock may occur within the system, requiring the test

computer to be rebooted. This situation can arise, for example,

when the application being tested fails and exits, and the Test

Driver becomes the active application. When the script then sends

keystrokes to close the application, they are sent to the Test

Driver, which can cause a deadlock. This will only happen for

keystroke sequences that tell the Test Driver to close itself, such

as "% c" (ALT+SPACEBAR+C) or "%fx" (ALT+F+X) or "%{F4}" (ALT+F4).

It is usually a good idea to first verify that the application

being tested is running and is the active application before

sending the keystrokes to close it. This verification can be done

using Test for Windows Procedures. See the MSTest Procedure

Reference for more information.

When running a Test for Windows script that contains any kind of

UAE trap, it is necessary to make sure that the "Dr. Watson"

application (DRWATSON.EXE) is not running. UAE traps set within

Test for Windows scripts conflict with this application. Dr. Watson

is a Microsoft diagnostic tool that is provided with Windows

version 3.1, and is located in the main Windows directory.

Additional reference words: 1.00 docerr