Macros are stored in a series of data files named MACROS##.DAT (where ## is replaced with the module's code). Global Macros (available from any module in Keystroke) are stored in the file named MACROS.DAT. Sales Manager Macros are stored in the file Data\Toolbars\"MacrosSM.DAT". Purchase Manager Macros are stored in the file Data\Toolbars\"MacrosPM.DAT". The Macros data files are in XML format and may be edited with a text editor or with the Keystroke Macro Editor. The Macro Editor is accessed through the Transaction, Parameters, Macros menu.
The Macro system has many advantages over standard keyboard macros. The main advantage is that when a Macro runs, it does not require the Clerk to be in an exact location in Keystroke in order for it to work correctly. For example, to change the current Line Item Entry mode from Product Code to Description, a keyboard macro would need to send the [F9] key five times. The problem is, if the current Entry Mode is not Product Code, the Line Item Entry mode is not changed to Description. And if the cursor is not on a the Line Item Entry screen, sending the [F9] key might do nothing at all (as it does when the Enter Customer screen is displayed). Macros allow the Line Item Entry mode to be set regardless of the current location with Keystroke.
When Macros is selected from the Transaction, Parameters menu, a list of the existing macros is displayed. From this list, the following function keys are available:
[Ins] - Add a new Macro.
[Delete] - Delete an existing Macro.
[Ctrl+X] - Cut an existing Macro (normally used to paste it in a different location on the Macro List).
[Ctrl+C] - Copy an existing Macro (normally used to paste and then edit it to create a similar Macro).
[Ctrl+V] - Paste a Copied or Cut Macro.
[Enter] or [F3] - Edit an existing Macro with the Macro Editor.
From the Macro Editor Screen, the following parameters can be set:
Name - Used to identify the macro. Name can be used to call the macro from Toolbar Buttons, from other Macros, or from Scripts. While not required, but for optimum use, Name should be unique and should not include spaces.
Description - Describes what the Macro does.
HotKey - The key combination to run the Macro from the keyboard. Certain key combinations are reserved and may not be assigned as Macro HotKeys (such as
[Shift+F12]).
Sales Macro Commands - Functions that the Sales Macro may run. Use [Ins] to select from a list of commands.
Purchase Macro Commands - Functions that the Purchase Macro may run. Use [Ins] to select from a list of commands.
Note: Keystroke does not check for duplicate Macro Names or HotKeys. Only the first one found is used. The HotKey is optional since Macros can be run from Toolbar Buttons, from other Macros, and from Scripts (and not just from the keyboard).
Macro Commands may be manually edited, but the recommended method to add Macro Functions is to press [Ins] to select them from the Macro Functions Lookup List in order to prevent spelling errors.