73. recordMacro

Parameter syntax:

'start'|'stop'|'toggle'|'cancel'|'view'|'get'|'replay'

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

start

Starts recording a sequence of commands.

stop

Stops recording the sequence of commands.

toggle

If the recording of a sequence of commands has been started, stops this recording. Otherwise, starts recording a sequence of commands.

cancel

Cancels the recording of a sequence of commands.

view

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

get

Returns a string containing last recorded macro in XML form. This option is useful to write higher-level commands and actions.

replay

Replays recorded sequence of commands.

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

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 "insert after" (i.e. which displays a dialog box).

Recording command execute is fully supported and works as expected: it is the command executed by execute which is recorded, and not execute itself.

Examples:

recordMacro start
recordMacro stop
recordMacro replay