QuePause May Fail if Active Window Changes Before QueFlush

ID Number: Q85437

1.00

WINDOWS

buglist1.00

Summary:

If the active window is changed between the start of an event queue

(using the TESTEVTN.DLL Que routines) and the terminating QueFlush

statement, the QuePause statements inserted in the event queue may

not take affect.

To work around this problem, insert a QueFlush statement immediately

before the QuePause statement. This will ensure that the active window

does not change before the QuePause statement is executed.

Microsoft has confirmed this to be a problem in Microsoft Test version

1.0 for Windows. We are researching this problem and will post new

information here as it becomes available.

More Information:

Script to Reproduce Problem

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

'$define TESTEVNT

'$include 'MSTEST.INC'

QueKeys "%frnotepad{ENTER}"

'QueFlush 1 'Uncomment to avoid problem

QuePause 30000 'Pause for 30 seconds

QueKeys "How does this look"

QueFlush 1

If you run the above script with only Test Driver and Program Manager

active, and Test Driver is set to minimize on run (under the

Environment option of the Test Driver Options menu), Notepad will

start, but the string "How does this look" will appear almost

immediately after Notepad is started.

Workaround

----------

To work around the problem, uncomment the QueFlush statement

just before the QuePause statement. Performing a QueFlush will start

a new event queue, and Notepad will be the active window from the

start of the queue (the QuePause statement) to the terminating

QueFlush statement.

Additional reference words: 1.00 buglist1.00