Categories


Popular topics

 Clicking the Edit macro... item in the "Configure" dropdown in the Advanced tab will immediately open the "Edit/create macro dialog." Here you can modify macros by editing, adding, or removing commands that have been previously generated either here or via macro recording. Defined in its simplest terms, a macro is a series of commands that can be played automatically within the editor.

This dialog contains the following options.

Macro
This dropdown contains a list of all loaded macros. Select any macro here to load that macro's commands in the macro editor so you can modify it.

Macro contents (left)
The large edit space on the left of the dialog containing the commands that make up the macro. Macro commands must be one of the predefined, supported commands, which are shown on the right hand side of the dialog. The only exception is for actual text to be input into the file by the macro, which must be encapsulated in quotes. Outside of this, you cannot add any character(s) that do not correspond to a predefined macro command, and doing so will cause an error prompt when attempting save changes to the macro. Commands are not case sensitive but must be spelled exactly as they are in the "Command" list.

Command
This is a list of all available commands for macros, sorted alphabetically. You can double-click on an item in this list to insert it into the active macro. To see documentation on all available macro commands, see the Macro commands topic.

Non-numeric parameters
Many of the commands in the command list have numeric parameters. The numeric parameters are quite obvious, such as GotoLine # # or GotoPage #. However, some of the commands such as find, replace, sort, etc. have parameters that aren't numeric. These additional parameters are listed below the command list for easy selection.

Close
Closes the "Edit/create macro" dialog and prompt you to save any unsaved changes.

New macro
Opens the Macro definition dialog allowing you to create a new macro, define its keyboard shortcut, set some properties, etc. before returning to the "Edit/create macro" dialog to enter its commands. In many cases, it's easier to generate a macro by recording it with the Record macro command first, then edit it if necessary. The learning curve is far lesser with this approach.

Modify
Opens the "Modify macro" dialog allowing you to delete macros, rename macros, and change macros' properties that are originally set in the Macro definition dialog when first creating a macro.

Creating a new macro

When you create a new macro, three commands are automatically added to the macro:

  1. InsertMode or OverStrikeMode
  2. ColumnModeOn or ColumnModeOff
  3. HexOn or HexOff

These three commands are added based on the current state of the editor. The purpose is to establish a known state each time the macro is played. If a macro is recorded in one mode and played back in another the results may be unpredictable. Establishing the mode at the beginning of the macro helps to ensure the expected results are achieved. These commands may be modified as required.

Once a macro has been created, you can edit its commands. Please note, that ^c and ^s may be used with many macro commands and will be replaced with the contents of the clipboard (^c) and the text currently selected (^s) at runtime. This allows you to record a macro that may reference a specific string and replace this with one of these two items to allow the string to be dynamically "specified" as the macro is run. More information on how this is useful is available at this power tip.

Full documentation of all available macro commands and their parameters is available in the Macro commands topic.

MediaWiki spam blocked by CleanTalk.