
General explanation about the language used is in the config files docs:.Today, there is quite some information in the Notepad++ User Manual, relating to the OP's question: Posting more than 10 years after the OP, but I think that this is still a relevant question (it is for me, at least).

:-) I guess the first lines are unnecessary (side effect or recording) but they were good examples of macro code anyway. Looks like I got the above macro from this thread or a similar place. Maybe that's where SciTE with its Lua scripting ability (or Programmer's Notepad which seems to be scriptable with Python) has an edge. I tried some tricks, but I fear such task is beyond the macro capabilities. Problem: Scintilla doesn't have a "Replace all" command: it is the task of the client to do the iteration, with or without confirmation, etc.Īnother problem: it seems type 1 action is limited to 1 char (I edited manually, when exiting N++ it was truncated). I guess action type 0 is for Scintilla commands with numerical params, type 1 is for commands with string parameter, 2 is for Notepad++ commands. insert string is nothing is selected), 2327 is Tab command, and Resource Hacker (just have it handy.) shows that 42024 is "Trim Trailing Space" menu item and 41006 is "Save". Looking at Scintilla.iface file, we can see that 2170 is the code of ReplaceSel (ie. I don't think it will record actions in dialogs (like search/replace). I haven't looked at the source, but from the look, I would say we have messages sent to Scintilla (the editing component, perhaps type 0 and 1), and to Notepad++ itself (probably activating menu items). Macros in Notepad++ are just a bunch of encoded operations: you start recording, operate on the buffer, perhaps activating menus, stop recording then play the macro.Īfter investigation, I found out they are saved in the file shortcuts.xml in the Macros section.
