A MACRO ROUTINES UNIT Copyright 1995 By Scott M. Baker and Bob Dalton INTRODUCTION: ------------ Sometimes you are going to want the option to allow the recording of macro keys in your door program. This unit adds that function to the DDPlus package. The MACROKEY.PAS code included in this archive is FREEWARE and can be used in any manner you want and without cost, but remains copyrighted to Scott Baker. The Macro Key routines portion of this document remain copyrighted to Scott Baker. Everything else is copyrighted by Bob Dalton. REQUIREMENTS: ------------ At this point in time the only requirements are that you must be using Borland Turbo Pascal version 6.0 or 7.0. I compiled the unit with Borland Pascal 7.0 Professional and know it works. I expect it will with TP 6.0 as well but can't guarantee it. You must also have already compiled the main DDPLUS.PAS unit BEFORE compiling the MACROKEY.PAS. Files Included -------------- Below is a listing of all files for the MACROKEY.ZIP Package: MACROKEY.DOC - The text file you are reading. MACROKEY.PAS - The Macro Key routines unit by Scott Baker. Installation and Preparation for Use ------------------------------------ 1. Move the archive package to a temporary directory and "unzip". 2. Before compiling the MACROKEY.pas unit be sure that your compiler knows where to find the listed units. 3. Add MACROKEY to the "Uses" portion of your program and call the procedures as needed. 4. That's it! Enjoy and good luck. PROCEDURE INFORMATION --------------------- DISPLAY_MACRO(s: string); [OUT] This procedure is used to display a macro-string. The macro string is usually contained in the variable MACRO_STRING. RECORD_MACRO(var s: string); [INP] This procedure allows the user to record a macro string, up to 255 characters that will be invoked whenever the CTRL-N key is pressed. The macro is stored in the string variable S. To activate the macro capability, you must place the macro into the string variable "MACRO_STRING". STACKED: string; [---] The Procedure sread and sreadln can have stacked commands which is when a user type something in like this: "m;101;m;102;m;103;m;104" Notice the ";"'s throughout the example. well this is a stacked command. the ";"'s indicate a seperate operation. This allows the user to type in multiple operations to preform on one line and not have to go through each and every prompt of the door. This can be very useful when used in combi- nation with the Record_Macro command. MACRO_STR: string; [INF/CTL] The contents of this variable are treated as a macro. Whenever the user types a CTRL-N, the string will be output. The string may be easily recorded with the RECORD_MACRO procedure and displayed with the DISPLAY_MACRO procedure.