macro recorder source code
I’m making a toy code editor in Electron from scratch for my own entertainment and I’d like to have a link to the folder in npp’s github repo where I can find the source code for the macro recorder.
Also if anyone has an insight into why Atom and VS Code have no macro recorder built into them and apparently no macro recorder available to install, I’m curious what would make them leave out such a great feature. MS Word has had an E-Z macro recorder since the cave days, why can’t they put one into their code editor too? I mean, I’m not asking what’s wrong with MS in general but is there a technical reason for this lapse. (Not too technical, I wouldn’t understand it.)
When I do look at the source code for npp’s macro recorder, I won’t know how it works without doing a major study, but I still want to look at it. My third question is whether there are any docs regarding npp’s macro recorder or macro recorders in general, or any other suggestions if someone finds this topic interesting. Thanks.
The macro recorder starts here, though you’ll have to follow the code flow into other areas of code as well. It mostly makes use of Scintilla’s macro-recorder, but it also sets the
_macroRecordingflag, which also influences the recording of certain Notepad++ commands starting here.
I have no insight into the design decisions of the other editors you mentioned; not sure why you would think that Notepad++ users would have such insight, but …
Docs regarding the recorder: not really; our docs are from the user perspective, not the implementation details. The online usermanual (which you could easily find using the ? menu in Notepad++) has a section called “Task automation with macros” on how to use the macro features of Notepad++. And the “Configuration file details:
<macros>” describes the format for the saved macro XML, so that you can manually edit new or previously-recorded macros.
@PeterJones , thanks for guiding me to the source code and Scintilla’s macro-recorder. I appreciate the effort you put into your response.