Module _m.textadept.macros

Support for recording, saving, and playing macros for the textadept module. Events: macro_saved() macro_deleted()

Functions

delete (macro_name) Deletes a specified macro.
load (filename) Loads macros from a specified file.
macro_notification (msg, wParam, lParam) [Local function] Handles a Scintilla macro notification.
play (macro_name) Plays a specified macro.
save (filename) Saves the current list of macros to a specified file.
start_recording () Starts recording a macro.
stop_recording () Stops recording a macro.
toggle_record () Toggles between recording a macro and not recording one.

Tables

current [Local table] The currently recording macro.
list The list of available macros.


Functions

delete (macro_name)
Deletes a specified macro.

Parameters

  • macro_name: The name of the macro to delete.
load (filename)
Loads macros from a specified file.

Parameters

  • filename: The absolute path to the file to load the macros from.
macro_notification (msg, wParam, lParam)
[Local function] Handles a Scintilla macro notification. If a macro is being recorded, add this command to 'current'.

Parameters

  • msg: The Scintilla message ID.
  • wParam:
  • lParam:
play (macro_name)
Plays a specified macro.

Parameters

  • macro_name: The name of the macro to play. If none specified, the user is prompted to choose one from a list of available macros.
save (filename)
Saves the current list of macros to a specified file.

Parameters

  • filename: The absolute path to the file to save the macros to.
start_recording ()
Starts recording a macro.
stop_recording ()
Stops recording a macro. Each command's msg in the recorded macro is changed to the name of the message Then the user is prompted for a macro name and the macro is saved to the current macro list and macro file.
toggle_record ()
Toggles between recording a macro and not recording one.

Tables

current
[Local table] The currently recording macro. It is a numerically indexed table of commands with each command having the same structure as described in list.
list
The list of available macros. Each key is the macro name, and the value is a numerically indexed table of commands. Each command is a table with a structure as follows: { command, wParam, lParam } where command is the buffer function and wParam and lParam are the arguments for it.

Valid XHTML 1.0!