If I manually edit %appdata%\Notepad++\shortcuts.xml
and manually add a find replace macro (See MACRO below), then close shortcuts.xml and then restart Notepad++, the macro is available to run from the Macro Menu button:
I wrote a program that programmatically edits shortcuts.xml and inserts the very same macro. Notepad++ is not up when I run my program. I know my program is working based on diffing copies of manually modified and programmatically modified shortcuts.xml files. However, when I restart Notepad++ after running my program, the Macro button is "dead", i.e., all macros, although present in shortcuts.xml, disappear from the Macro button.
Is Notepad++ somehow sensitive to its shortcuts.xml file being programmatically manipulated?
MACRO Screenshot (text version follows)
Text Version
<Macro name="Redactor" Ctrl="no" Alt="no" Shift="no" Key="0">
<Action type="0" message="2422" wParam="0" lParam="0" sParam="" />
<Action type="0" message="2325" wParam="0" lParam="0" sParam="" />
<Action type="3" message="1700" wParam="0" lParam="0" sParam="" />
<Action type="3" message="1601" wParam="0" lParam="0" sParam="(?:[0-9]{1,3}\.){3}[0-9]{1,3}" />
<Action type="3" message="1625" wParam="0" lParam="2" sParam="" />
<Action type="3" message="1602" wParam="0" lParam="0" sParam="IP-Placeholder" />
<Action type="3" message="1702" wParam="0" lParam="768" sParam="" />
<Action type="3" message="1701" wParam="0" lParam="1609" sParam="" />
<Action type="0" message="2422" wParam="0" lParam="0" sParam="" />
<Action type="0" message="2325" wParam="0" lParam="0" sParam="" />
<Action type="3" message="1700" wParam="0" lParam="0" sParam="" />
<Action type="3" message="1601" wParam="0" lParam="0" sParam="\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b" />
<Action type="3" message="1625" wParam="0" lParam="2" sParam="" />
<Action type="3" message="1602" wParam="0" lParam="0" sParam="email-placeholder" />
<Action type="3" message="1702" wParam="0" lParam="768" sParam="" />
<Action type="3" message="1701" wParam="0" lParam="1609" sParam="" />
</Macro>