Microsoft KB Archive/111953

= Microsoft Knowledge Base =

PRB: SmartEvents Recorder Msg: Recorder has shut itself down
Last reviewed: January 10, 1995

Article ID: Q111953

The information in this article applies to:

- Microsoft Test for Windows, version 2.0

SYMPTOMS
The error "The recorder has shut itself down..." occurs because the recorder has exhausted its own internal buffer. It uses this buffer to watch the Windows message stream.

This means that the recorder did not see any combination of messages it recognized in response to the preceding hardware event. This in turn means that the recorder couldn't determine what it was that you did before it ran out of buffer space. There is no way to increase this internal buffer size.

CAUSE
The Microsoft Test recorder works by monitoring the hardware events (keystrokes, mouse clicks, and so on) that occur while you are recording. It then monitors the Windows message queue for messages that occur following a hardware event. The recorder tries to determine what the user did based on the incoming messages following a hardware event. There's a nearly infinite number of possible event and message combinations, so there are some cases when the recorder will run into trouble and possibly produce incomplete code.

The recorder can handle standard Windows events like clicking a button, or pulling down a menu. Where you will run into trouble, is with programs that have custom events.

WORKAROUND
Here are two of several ways you can work around this situation:

  Turn off the Smart Events option from the Recorder dialog. This can be reached from the Tools menu in TESTDRVR.EXE or from the Record Events option (Alt+O+R). By turning off smart events, you force the recorder to record the hardware events as they occur and not try to determine what happened in response to those events. See pages 65-66 of the Microsoft Test "User's Guide" for some tips on using the recorder without smart events. -or-  Continue to use smart events, but stop recording just before you reach the point where the recorder encounters the error. Add code manually to the script to cause the recorder to move past the point that causes the error and then continue recording. Append the new code to the original script.