ProgramEdit

Macros Help

PgmEdit - Macros

PgmEdit home

Macros can be used to record keystrokes, which can then replayed thus saving repetitive typing.  Most all keys can be recorded including alphabetic, numeric, arithmetic, punctuation, Insert, Home, End, PageUp, PageDown, Delete, Tab, Enter, and Arrow keys.

Note that only keyboard keys are recorded - Mouse operations are NOT recorded.

Note also that (currently) only built-in shortcuts can be recorded.  Other shortcuts (such as F1-F12, Ctrl+W, etc.) cannot be recorded, but can be added to a macro by editing.  See Help/Shortcuts Keys Help for a list of Built-in Shortcuts.

Each Macro consists of the Macro name and its recorded text.  For example:

1) Macro name "NBSP" with text " " saves the HTML code for a non-breaking space.

2) Macro name "IfThenElse" with the following lines of text:

If X Then

ElseIf Y Then

Else

End If

saves a template for a VB If-Then-Else structure.

Macros can be Recorded, Saved, Loaded & Played, Copied/Renamed, Deleted, and Edited:

1. Record a new Macro - Macros/Record Keystrokes

To record a new Macro, click on the Macros/Record Keystrokes menu.
Next, with the file-to-be-modified selected, type the text and other keys (Enter, Tab, Down Arrow, etc.) for the Macro.
Then click on the Macros/Stop Recording menu.

Test the recording - Macros/Play Keystrokes

To test the recording: with the file-to-be-modified selected, click on the Macros/Play Keystrokes menu.

Save the new Macro - Macros/Save Recording

To save the new macro, click on the Macros/Save Recording menu, enter a Macro name, and click on the Save Recording button.

2. Load & Play a Macro - Macros/Saved Macros

To load a Macro, click on the Macros/Saved Macros menu.  Then select the Macro to be loaded and click on the Load Macro button.  This will enable the selected macro to be the one run by the Macro/Play Keystrokes menu item.

CAUTION - When assigning a shortcut (Tools/Customize Shortcuts) to the Play Keystrokes menu item, do not use the Control Keys (Ctrl, Shift, Alt) as part of the shortcut if Special Keys are in the Keystrokes/Macro.
To support both Text-Only and Special-Keys Macros, the recommended shortcut for Play Keystrokes is F2-F12.

Tip - Play Keystrokes can be used to repeat any macro with a single key press if it is assigned a Function key shortcut such as F8.

3. Copy/Rename a Macro - Macros/Saved Macros

To copy or rename an existing Macro, click on the Macros/Saved Macros menu.  Select the Macro to be copied/renamed, click the Load Macro button, enter a unique Macro Name, and then click the Save Macro button.
Then (optionally) select the old Macro name and click the Delete Macro button.

4. Delete a Macro - Macros/Saved Macros

To delete a Macro, click on the Macros/Saved Macros menu.  Then select the Macro to be deleted and click on the Delete Macro button.
Note (C:Drive Install only):  Deleted Macros are sent to the Recycle Bin and can be restored.  Restored Macros are visible once the Saves Macros dialog is reopened.

5. Edit a Macro - Macros/Saved Macros

To edit an existing Macro, select the Macro to be edited, check the "Edit Macro text" checkbox, edit the text, and then click the Save button.

Tip - If the Macro Name is changed (other than a change in case), a new Macro will be created.

Edit Mode - Text Only

Text Only mode will output the Macro text exactly as written (Special Keys cannot be used).   Special Keys mode will interpret the Macro text and will activate any Special Keys detected.

For example: If the Macro text is "ABC^v", Text Only mode will output "ABC^v", while Special Keys mode will recognize the Paste shortcut(Ctrl+V) and output "ABC" plus the contents of the ClipBoard.

Edit Macro - Special Keys

To add Special keys (such as Return, Tab, Enter, Home, etc.) to a Macro, use the codes listed in Section 7. Special Keys Table.

Tip - Shortcuts that cannot be recorded can be added in the Special Keys mode.

CAUTION - Always use lower-case for letters following Ctrl/Shift/Alt(^+%)

Special Keys Examples:

- to add shortcut CTRL+SHIFT+P : enter "^+p"
- to open the Keywords folder(Alt+F, K) : enter "%fk"
- to add two Tab keystrokes : enter "{TAB}{TAB}"

6. Recent Macro List - Macros/1 xxx...9 xxx

Each time a macro is loaded (Macros/Saved Macros/Load Macro), the macro is added to the top of the Recent Macro List in the Macros menu.  This is a list of the last (9) macros loaded; it is analogous to the Recent File List of the File menu.

For example: Assume that macro "def" is loaded and then macro "abc" is loaded.  Two items will now be shown in the Macros menu: "1 abc" and "2 def".

Clicking on "1 abc" will play macro "abc", etc.

Recent Macro List - Shortcuts

Shortcuts can be assigned to each of the nine Recent Macro List items using Tools/Customize Shortcuts.  For the above example, Customize Shortcuts will list "Shortcut to Change" items "1 abc", "2 def", "3" ... "9".  Items 3-9 have no macro name since the Recent Macro List has only items 1 and 2.

Tip - Note that Macro List shortcuts are assigned to the numbers 1-9, NOT to the macro name ("abc" or "def").  For example, if a third macro "ghi" is loaded, the shortcut that was assigned to "1 abc" is now assigned to "1 ghi".

Recent Macro List shortcuts have the same CAUTION as the Play Keystrokes menu item:

CAUTION - When assigning shortcuts (Tools/Customize Shortcuts) to the Recent Macro List items 1-9, do not use the Control Keys (Ctrl, Shift, Alt) as part of the shortcut if Special Keys are in the Macro.
To support both Text-Only and Special-Keys Macros, the recommended shortcuts for Recent Macro List items are F2-F12.

Recent Macro List - Right-click menu

Right-clicking on a Recent Macro will open a pop-up menu with (3) choices: Run Macro, Copy Macro, and Cancel.  Run Macro plays the macro just as Left-clicking the Recent Macro does.  However Copy Macro is a new function: it copies the macro text to the Clipboard.

Tip - Using "Copy Macro" enables the Recent Macro's text to be pasted to any application.  This can be useful, for example, for web URLs, email addresses, or passwords.

7. Special Keys Table

Key Code      Key Code      Key Code
Ctrl ^ Shift + Alt %
^ {^} } {}} ] {]}
) {)} { {{} [ {[}
( {(} % {%} + {+}
~ {~} BackSpace {BACKSPACE} Cancel {BREAK}
Caps Lock {CAPSLOCK} Delete/Del {DELETE} Down Arrow {DOWN}
End {END} Enter ~ Esc {ESCAPE}
F1-F16 {F1}-{F16} Home {HOME} Insert {INSERT}
Left Arrow {LEFT} Num Lock {NUMLOCK} Page Down {PGDN}
Page Up {PGUP} Print Screen {PRTSC} Return ~
Right Arrow {RIGHT} Scroll Lock {SCROLLLOCK} Tab {TAB}
Up Arrow {UP}