<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Adding more steps to an existing Macro]]></title><description><![CDATA[<p dir="auto">I have a Macro started and stopped to test it.<br />
Now I do not want to start again. I want to add some steps.<br />
How do I do that please.<br />
Can I view the Macro code?</p>
<p dir="auto">Thanx,<br />
Bob</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/26492/adding-more-steps-to-an-existing-macro</link><generator>RSS for Node</generator><lastBuildDate>Fri, 09 Oct 2026 04:18:54 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/26492.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 23 Dec 2024 19:37:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Adding more steps to an existing Macro on Wed, 25 Dec 2024 17:57:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robert-or-janet-diebel" aria-label="Profile: Robert-Or-Janet-Diebel">@<bdi>Robert-Or-Janet-Diebel</bdi></a> said in <a href="/post/98747">Adding more steps to an existing Macro</a>:</p>
<blockquote>
<p dir="auto">Are comments allowed in shortcuts.xml?</p>
</blockquote>
<p dir="auto">You can do this:</p>
<p dir="auto"><code>            &lt;Action type="1" message="2172" wParam="0" lParam="0" sParam="I am a comment!!!!!!!!" /&gt;</code></p>
]]></description><link>https://community.notepad-plus-plus.org/post/98751</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/98751</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 25 Dec 2024 17:57:55 GMT</pubDate></item><item><title><![CDATA[Reply to Adding more steps to an existing Macro on Tue, 24 Dec 2024 20:22:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robert-or-janet-diebel" aria-label="Profile: Robert-Or-Janet-Diebel">@<bdi>Robert-Or-Janet-Diebel</bdi></a> said in <a href="/post/98749">Adding more steps to an existing Macro</a>:</p>
<blockquote>
<p dir="auto">After changes to the file, or a new file copied in, the Macros I can see in the file are no longer available.</p>
</blockquote>
<p dir="auto">It works for me.  I pasted your example into my active shortcuts.xml file, saved, exited Notepad++, and restarted, and it saw the new macro just fine.</p>
<p dir="auto"><img src="/assets/uploads/files/1735071568549-3194e349-0f6d-4682-a113-c79cd83af7bf-image.png" alt="3194e349-0f6d-4682-a113-c79cd83af7bf-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Are you sure you did things in the right order?  The <a href="https://npp-user-manual.org/docs/config-files/#editing-configuration-files" rel="nofollow ugc">User Manual</a> describes the order of events you must follow if you want to edit a Notepad++ config file with Notepad++ – you have to exit Notepad++ (to make sure that all the changes Notepad++ has queued up are written), then start Notepad++, then do the manual edit, then save and exit (without doing any changes in the GUI) then restart.  If you don’t follow that order, Notepad++ will overwrite your changes (if there had been any GUI changes that affect that file) when it exits,</p>
]]></description><link>https://community.notepad-plus-plus.org/post/98750</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/98750</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 24 Dec 2024 20:22:27 GMT</pubDate></item><item><title><![CDATA[Reply to Adding more steps to an existing Macro on Tue, 24 Dec 2024 20:12:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a><br />
OK NOW. I removed the shortcuts.xml file, Stopped/Started Notepad++. It made a new. I modified and it appears to work.<br />
Thanx for all the help. This will be so handy!</p>
<p dir="auto">Sorry for not marking code. I will going forward.<br />
I cloned and changed the shortcuts.xml.<br />
Than stopped/started Notepad++<br />
It does not recognize the new file.<br />
After changes to the file, or a new file copied in, the Macros I can see in the file are no longer available.</p>
<hr />
<pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
&lt;NotepadPlus&gt;
    &lt;InternalCommands /&gt;
    &lt;Macros&gt;
        &lt;Macro name="Trim Trailing Space and Save" Ctrl="no" Alt="yes" Shift="yes" Key="83"&gt;
            &lt;Action type="2" message="0" wParam="42024" lParam="0" sParam="" /&gt;
            &lt;Action type="2" message="0" wParam="41006" lParam="0" sParam="" /&gt;
        &lt;/Macro&gt;
        &lt;Macro name="ParaTxt2Raw2" Ctrl="no" Alt="no" Shift="no" Key="0"&gt;
            &lt;Action type="3" message="1700" wParam="0" lParam="0" sParam="" /&gt;
            &lt;Action type="3" message="1601" wParam="0" lParam="0" sParam="\\id.*?\\p" /&gt;
            &lt;Action type="3" message="1625" wParam="0" lParam="2" sParam="" /&gt;
            &lt;Action type="3" message="1602" wParam="0" lParam="0" sParam="\\c 1" /&gt;
            &lt;Action type="3" message="1702" wParam="0" lParam="1794" sParam="" /&gt;
            &lt;Action type="3" message="1701" wParam="0" lParam="1609" sParam="" /&gt;
            &lt;Action type="3" message="1700" wParam="0" lParam="0" sParam="" /&gt;
            &lt;Action type="3" message="1601" wParam="0" lParam="0" sParam="\\[a-z][\s|\r\n]" /&gt;
            &lt;Action type="3" message="1625" wParam="0" lParam="2" sParam="" /&gt;
            &lt;Action type="3" message="1602" wParam="0" lParam="0" sParam="" /&gt;
            &lt;Action type="3" message="1702" wParam="0" lParam="1794" sParam="" /&gt;
            &lt;Action type="3" message="1701" wParam="0" lParam="1609" sParam="" /&gt;
            &lt;Action type="3" message="1700" wParam="0" lParam="0" sParam="" /&gt;
            &lt;Action type="3" message="1601" wParam="0" lParam="0" sParam="\r\n\n" /&gt;
            &lt;Action type="3" message="1625" wParam="0" lParam="2" sParam="" /&gt;
            &lt;Action type="3" message="1602" wParam="0" lParam="0" sParam="\r\n" /&gt;
            &lt;Action type="3" message="1702" wParam="0" lParam="770" sParam="" /&gt;
            &lt;Action type="3" message="1701" wParam="0" lParam="1609" sParam="" /&gt;
        &lt;/Macro&gt;
    &lt;/Macros&gt;
    &lt;UserDefinedCommands&gt;
        &lt;Command name="Get PHP help" Ctrl="no" Alt="yes" Shift="no" Key="112"&gt;https://www.php.net/$(CURRENT_WORD)&lt;/Command&gt;
        &lt;Command name="Wikipedia Search" Ctrl="no" Alt="yes" Shift="no" Key="114"&gt;https://en.wikipedia.org/wiki/Special:Search?search=$(CURRENT_WORD)&lt;/Command&gt;
        &lt;Command name="Open selected file path in new instance" Ctrl="no" Alt="yes" Shift="no" Key="117"&gt;$(NPP_FULL_FILE_PATH) $(CURRENT_WORD) -nosession -multiInst&lt;/Command&gt;
    &lt;/UserDefinedCommands&gt;
    &lt;PluginCommands /&gt;
    &lt;ScintillaKeys /&gt;
&lt;/NotepadPlus&gt;
</code></pre>
<p dir="auto">-–</p>
<p dir="auto"><em>moderator added code markdown around text; please don’t forget to <a href="https://community.notepad-plus-plus.org/topic/21925/faq-desk-formatting-forum-posts">use the <code>&lt;/&gt;</code> button to mark example text as “code”</a> so that characters don’t get changed by the forum</em></p>
]]></description><link>https://community.notepad-plus-plus.org/post/98749</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/98749</guid><dc:creator><![CDATA[Robert Or Janet Diebel]]></dc:creator><pubDate>Tue, 24 Dec 2024 20:12:31 GMT</pubDate></item><item><title><![CDATA[Reply to Adding more steps to an existing Macro on Tue, 24 Dec 2024 19:04:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robert-or-janet-diebel" aria-label="Profile: Robert-Or-Janet-Diebel">@<bdi>Robert-Or-Janet-Diebel</bdi></a> said in <a href="/post/98747">Adding more steps to an existing Macro</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a><br />
Are comments allowed in shortcuts.xml?</p>
</blockquote>
<p dir="auto">Allowed, yes.  Preserved, I don’t think so.  If you record a new macro or do anything else in the GUI that affects that file (create a run menu entry, or change shortcut in Shortcut Mapper), I seem to remember that it will rewrite the file without your comments.</p>
<p dir="auto">I have sometimes used the string attribute on a command that doesn’t use it to create a pseudo-comment in a macro…  You can search the forum for my posts about macros, and can probably find an example with pseudo-comments.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/98748</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/98748</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 24 Dec 2024 19:04:59 GMT</pubDate></item><item><title><![CDATA[Reply to Adding more steps to an existing Macro on Tue, 24 Dec 2024 18:49:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a><br />
Are comments allowed in shortcuts.xml?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/98747</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/98747</guid><dc:creator><![CDATA[Robert Or Janet Diebel]]></dc:creator><pubDate>Tue, 24 Dec 2024 18:49:38 GMT</pubDate></item><item><title><![CDATA[Reply to Adding more steps to an existing Macro on Tue, 24 Dec 2024 16:02:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> said in <a href="/post/98744">Adding more steps to an existing Macro</a>:</p>
<blockquote>
<p dir="auto">%AppData%\Notepad++\shortcuts.xm</p>
</blockquote>
<p dir="auto">You nailed it, Thanx a bunch</p>
]]></description><link>https://community.notepad-plus-plus.org/post/98745</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/98745</guid><dc:creator><![CDATA[Robert Or Janet Diebel]]></dc:creator><pubDate>Tue, 24 Dec 2024 16:02:54 GMT</pubDate></item><item><title><![CDATA[Reply to Adding more steps to an existing Macro on Tue, 24 Dec 2024 15:56:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robert-or-janet-diebel" aria-label="Profile: Robert-Or-Janet-Diebel">@<bdi>Robert-Or-Janet-Diebel</bdi></a> said in <a href="/post/98743">Adding more steps to an existing Macro</a>:</p>
<blockquote>
<p dir="auto">How do I find them?</p>
</blockquote>
<p dir="auto">You probably need to open <code>%AppData%\Notepad++\shortcuts.xml</code>, which is the active copy of that file, not the one in your installation directory (which is the one I guess you opened)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/98744</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/98744</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 24 Dec 2024 15:56:20 GMT</pubDate></item><item><title><![CDATA[Reply to Adding more steps to an existing Macro on Tue, 24 Dec 2024 15:53:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a><br />
My shortcuts.xml - I have 2 Macros - ParaTxt2Raw and RegExTest.<br />
How do I find them?</p>
<hr />
<pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
&lt;NotepadPlus&gt;
    &lt;InternalCommands /&gt;
    &lt;Macros&gt;
        &lt;Macro name="Trim Trailing Space and Save" Ctrl="no" Alt="yes" Shift="yes" Key="83"&gt;
            &lt;Action type="2" message="0" wParam="42024" lParam="0" sParam="" /&gt;
            &lt;Action type="2" message="0" wParam="41006" lParam="0" sParam="" /&gt;
        &lt;/Macro&gt;
    &lt;/Macros&gt;
    &lt;UserDefinedCommands&gt;
        &lt;Command name="Get PHP help" Ctrl="no" Alt="yes" Shift="no" Key="112"&gt;https://www.php.net/$(CURRENT_WORD)&lt;/Command&gt;
        &lt;Command name="Wikipedia Search" Ctrl="no" Alt="yes" Shift="no" Key="114"&gt;https://en.wikipedia.org/wiki/Special:Search?search=$(CURRENT_WORD)&lt;/Command&gt;
        &lt;Command name="Open selected file path in new instance" Ctrl="no" Alt="yes" Shift="no" Key="117"&gt;$(NPP_FULL_FILE_PATH) $(CURRENT_WORD) -nosession -multiInst&lt;/Command&gt;
    &lt;/UserDefinedCommands&gt;
    &lt;PluginCommands /&gt;
    &lt;ScintillaKeys /&gt;
&lt;/NotepadPlus&gt;
</code></pre>
<hr />
<p dir="auto">-–</p>
<p dir="auto"><em>moderator added code markdown around text; please don’t forget to <a href="https://community.notepad-plus-plus.org/topic/21925/faq-desk-formatting-forum-posts">use the <code>&lt;/&gt;</code> button to mark example text as “code”</a> so that characters don’t get changed by the forum</em></p>
]]></description><link>https://community.notepad-plus-plus.org/post/98743</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/98743</guid><dc:creator><![CDATA[Robert Or Janet Diebel]]></dc:creator><pubDate>Tue, 24 Dec 2024 15:53:42 GMT</pubDate></item><item><title><![CDATA[Reply to Adding more steps to an existing Macro on Tue, 24 Dec 2024 14:44:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robert-or-janet-diebel" aria-label="Profile: Robert-Or-Janet-Diebel">@<bdi>Robert-Or-Janet-Diebel</bdi></a> said in <a href="/post/98735">Adding more steps to an existing Macro</a>:</p>
<blockquote>
<p dir="auto">I wish to add more steps to an existing Macro</p>
</blockquote>
<p dir="auto">The presumption here is that you created the macro via macro <em>recording</em>.<br />
No, there is no way to add to it, via recording.</p>
<blockquote>
<p dir="auto">I am using RegEx’s to alter the content.</p>
</blockquote>
<p dir="auto">Another presumption is that you’ve recorded one replacement operation into your macro, and now you want to add more of those.<br />
If so, then it is fairly easy to “hand-edit” the macro to include more such operations.</p>
<ul>
<li>exit Notepad++ to make sure that it saves its current configuration</li>
<li>make a copy of your <code>shortcuts.xml</code> file (in case something bad happens) :-)</li>
<li>restart Notepad++</li>
<li>edit <code>shortcuts.xml</code> and locate your macro within it</li>
<li>note that there are a block of lines in the macro starting with <code>1700</code> and ending with <code>1701</code></li>
<li>copy and paste that block of lines at the end of the macro</li>
<li>edit the (copied) lines that contain your search regex text and your replacement text, to conform to the new replacement operation that you want to add</li>
<li>save <code>shortcuts.xml</code></li>
<li>restart Notepad++</li>
</ul>
<p dir="auto">For much more detail, see the user manual page for this, <a href="https://npp-user-manual.org/docs/searching/#searching-actions-when-recorded-as-macros" rel="nofollow ugc">HERE</a>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/98737</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/98737</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Tue, 24 Dec 2024 14:44:36 GMT</pubDate></item><item><title><![CDATA[Reply to Adding more steps to an existing Macro on Tue, 24 Dec 2024 13:12:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/terry-r" aria-label="Profile: Terry-R">@<bdi>Terry-R</bdi></a> said in <a href="/post/98724">Adding more steps to an existing Macro</a>:</p>
<blockquote>
<p dir="auto">recreating the macro with additional steps,</p>
</blockquote>
<p dir="auto">Yes, I wish to add more steps to an existing Macro. I am using RegEx’s to alter the content.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/98735</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/98735</guid><dc:creator><![CDATA[Robert Or Janet Diebel]]></dc:creator><pubDate>Tue, 24 Dec 2024 13:12:42 GMT</pubDate></item><item><title><![CDATA[Reply to Adding more steps to an existing Macro on Mon, 23 Dec 2024 20:03:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robert-or-janet-diebel" aria-label="Profile: Robert-Or-Janet-Diebel">@<bdi>Robert-Or-Janet-Diebel</bdi></a></p>
<p dir="auto">There is a FAQ post <a href="https://community.notepad-plus-plus.org/topic/25400/faq-automating-notepad">here</a> that should have a lot of information for you.</p>
<p dir="auto">In saying you do not want to start again, are you referring to recreating the macro with additional steps, or have you already changed the data with the existing macro. In either case I think you would still record the new steps and then work on incorporating them into the existing macro, rather than try to read, intepret and alter the existing macro by essentially programming the extra steps. That would require a lot of effort as the macro isn’t all that easy to understand.</p>
<p dir="auto">good luck<br />
Terry</p>
]]></description><link>https://community.notepad-plus-plus.org/post/98724</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/98724</guid><dc:creator><![CDATA[Terry R]]></dc:creator><pubDate>Mon, 23 Dec 2024 20:03:52 GMT</pubDate></item></channel></rss>