WINTEST.MST Sample May Open or Restore Other Applications

ID Number: Q82154

1.00

WINDOWS

buglist1.00

Summary:

Running the WINTEST.MST sample test script (provided with Microsoft

Test version 1.0 for Windows) may result in an unrelated application

being started or a minimized application being restored when the

WINTEST.MST script closes Paintbrush. This error occurs because of an

error in the sample script.

Microsoft has confirmed this to be a problem with the WINTEST.MST

sample script provided with Microsoft Test version 1.0 for Windows. A

correction for this problem is shown below.

More Information:

The last two lines of the WINTEST.MST script call the FastTest

routines XAlt and XEnter to close the active application, Paintbrush,

as follows:

XAlt "f"

XEnter "x"

The code above sends three keystrokes: ALT+F, X, and ENTER. Because

Paintbrush closes itself after receiving the ALT+F, X combination, the

ENTER key event does not go to Paintbrush, but instead goes to

whatever window becomes the active window when Paintbrush closes. If

the next active window happens to be Windows Program Manager, the

ENTER key will cause one of your applications listed in Program

Manager to start running. If all windows are minimized, the ENTER key

event will cause one of them to be restored to normal size.

To avoid this problem, use the XText statement instead of XEnter, as

follows:

XAlt "f"

XText "x"

Additional reference words: 1.00