This project is read-only.

Software Design

How does it work

The application is pretty simple: it randomly sends mouse and keyboard events to the system. What makes the program larger is doing this in a way that will not kill windows, but only stress the application you want to stress.
  • There are three ways of attaching to the application:
    1. Letting the user select the application / window
    2. Find an application by name: it looks for the window with a title or an application that matches the name
    3. Find an application by identifier number, eg either the process id or the window handle
  • Find some properties about the application & windows -- usually this is the bounding rectangle, so that the program doesn't go nuts clicking on other applications.
  • Randomly generates an event and sends it. Button press events are followed by more events, then the corresponding button release event.
  • Handling errors or the predictably unexpected.

File Structure

  1. The main application structure
  2. A portion to find the window(s) to manipulate
  3. There is a sub-directory, called Win32 for the p/invoke to the Windows platform

Files are kept fairly small, with a related set of parts, and lots of comments. A class is split across many file.
Files that primarily define a structure are named for said structure.

Conventions on Enumerations and Constants

Many of the p/invoke API's use #define's to name flags and modes. Typically the C API's have a naming convention like XYZ_ABC. In this project they have been converted to enumerations, to help catch misuse of the flags. The enumeration is given the name XYZ and the contents have the XYZ_ removed: they are are just the ABC part.

Last edited Oct 17, 2009 at 2:49 PM by randym, version 7


No comments yet.