6.4. "Record Macro" menu

You may need to enable this submenu by checking "Enable the 'Tools|Record Macro' Submenu" in OptionsPreferences, General|Features section.

This menu allows to record a sequence of commands and to replay the recorded sequence at will.

This facility used in conjunction with SelectFind Element facility or with the Search tool may be seen as an advanced, versatile, yet simple to use, form of search/replace.

Start

Starts recording a sequence of commands.

Stop

Stops recording the sequence of commands.

Cancel

Cancels the recording of a sequence of commands.

View

Displays a dialog box containing recorded macro in XML form. Very handy to paste it in an XXE configuration file (see Section 4, “command” in XMLmind XML Editor - Configuration and Deployment).

Replay

Replays recorded sequence of commands.

Procedure 3.1. Procedure for recording a sequence of commands
  1. Use the Start menu item.

  2. Invoke commands as usual: use key bindings, menu items and tool bar buttons.

    Typing some text is of course supported. ``Tabbing'' from a text node to another is supported too.

    The following tools can also be used during a recording: Edit, Attributes, Search, Characters.

    If you use the Search tool during a recording, just use the search part; do not use the replace part. And after the searched string is found and selected, click on the Stop button of the Search tool to give keyboard focus back to the document view. This will allow you to continue adding more commands to the recorded sequence.

  3. Use the Stop menu item.

Only editing commands can be recorded. That is, commands that modify the contents and/or the selection marks of the document being edited. Actions such as FileOpen or ViewAdd cannot be recorded.

At most 20 commands can be recorded. Typing contiguous characters, no matter how many, counts as a single command.

Attempting to record the following commands will automatically cause macro recording to be canceled:

Recording interactive command such as Insert After works as expected: it is the command along with the element interactively chosen by the user which is recorded, and not the interactive invocation of Edit+Insert After (i.e. which activates the Edit tool or which displays the equivalent dialog box).

Recording command Execute Command is fully supported and works as expected: it is the command executed by ToolsExecute Command which is recorded, and not the invocation of ToolsExecute Command.