ADDMACRO.PAS is a Turbo Pascal fully self-contained unit that implements
a keyboard macro system including keystroke recording and playback.

Simply add the unit to the 'uses' statement at the beginning of your
program, and voila instant macro capability in any pascal program.

Once you've added the macro unit to your program you can invoke it by
pressing the ALT-M keystroke combination (this pops up the macro control
menu). There are then 5 options:
 Create a macro - You will be asked to select a macro hotkey which can
   be any combination of ALT or CTRL or SHIFT and any Function Key (F11
   and F12, are not supported).  You then type in the macro (up to 255
   characters), the macro recorder clicks as you go as a reminder.  Typing
   <ALT-M> again will terminate macro recording.
 Delete a macro - You will be asked to select a hotkey whose macro you
   want to delete.
 View the macros - Will display a list of all defined macros in a
   scrollable list.
 Save the current macros - Will save the macros to a file of the same name
   as the file currently being run, but with the '.MAC' extension.
 Toggle the macros On/Off - By default any macros which have been recorded
   are available at the touch of a key.  If for some reason you which to
   turn off the ability to use the macros for some reason this option
   toggles the mode between active/inactive. (ALT-M stiil works.)

NOTES: This unit should work with TP 6.0 and may work with TP/BP 7.0
in real mode, but I can pretty much guarantee that it'll cause all manner
of GP faults in protected mode - fixing this is left as an easy execise for
the student :-).

The keyboard handler naturally conflicts seriously with TP's built-in
debugger (two keyboard handler's wrestling,) and will likely lock up you
system if you try and step through a program with this unit included. I'd
recommend either adding this unit to your program when everything else is
working, or have a compiler directive which comments out the unit when
you're debugging your code.


Lastly:

This unit is copyrighted, if you change it, keep it to yourself, don't pass
around modified versions.  If you use the unit in a program, please give
credit for the macro capability.


Good luck and enjoy.


Douglas P. Webb



