<?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[Having trouble getting a macro to work as desired]]></title><description><![CDATA[<p dir="auto">Hi, all,  New here.  Thanks for having me.</p>
<p dir="auto">I first got dropped off at the Search/Replace desk, but I’m not sure this belongs there, as I’m not having problems with S/R, but with the macro I recorded that is supposed to govern it.</p>
<p dir="auto">I often have occasion to work with spintax, and I recorded a small macro that takes a list of items and converts it into a spintax-usable string…and another that will go the other way.</p>
<p dir="auto">The first macros I recorded apply the actions to the entire document.</p>
<p dir="auto">There will be some times, however, where I might want to have these conversions performed on only a portion of the document.</p>
<p dir="auto">I re-recorded the macro (both ways … text to spintax and spintax to text), being sure to have the “In Selection” checked in the Search/Replace dialog box while I performed the operations on the portion of the document I was working with.</p>
<p dir="auto">While I was recording the macro, everything was proceeding and looking exactly like I would want it to, given any list of terms that were a portion of the document that I’d want converted.</p>
<p dir="auto">With the macro saved and attempting to deploy it on another list of terms in my document, it…uh…didn’t look quite how I’d hoped.  Far from.</p>
<p dir="auto">I’m including the macro codes here in the hopes that someone might be able to tell me what might have gone wrong and where.</p>
<p dir="auto">The problem I’m having is with the second two macros, which say “Selection Only.”  Basically, what I was hoping to achieve with the second two macros is the same thing as with the first two macros, just on “selected text” as opposed to globally.</p>
<p dir="auto">Thank you, and the xml follows.</p>
<pre><code>&lt;Macro name="List to Spintax (Entire Document)" Ctrl="no" Alt="yes" Shift="no" Key="219"&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" /&gt;
            &lt;Action type="3" message="1625" wParam="0" lParam="1" sParam="" /&gt;
            &lt;Action type="3" message="1602" wParam="0" lParam="0" sParam="|" /&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;Action type="3" message="1700" wParam="0" lParam="0" sParam="" /&gt;
            &lt;Action type="3" message="1601" wParam="0" lParam="0" sParam="^" /&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="770" 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="$" /&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="770" sParam="" /&gt;
            &lt;Action type="3" message="1701" wParam="0" lParam="1609" sParam="" /&gt;
        &lt;/Macro&gt;
        &lt;Macro name="Spintax to List (Entire Document)" Ctrl="no" Alt="yes" Shift="no" Key="221"&gt;
            &lt;Action type="3" message="1700" wParam="0" lParam="0" sParam="" /&gt;
            &lt;Action type="3" message="1601" wParam="0" lParam="0" sParam="{" /&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="770" 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="}" /&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="770" 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="|" /&gt;
            &lt;Action type="3" message="1625" wParam="0" lParam="1" 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;Macro name="List to Spintax (Selection Only)" Ctrl="no" Alt="yes" Shift="yes" Key="219"&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" /&gt;
            &lt;Action type="3" message="1625" wParam="0" lParam="1" sParam="" /&gt;
            &lt;Action type="3" message="1602" wParam="0" lParam="0" sParam="|" /&gt;
            &lt;Action type="3" message="1702" wParam="0" lParam="898" 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="^" /&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="898" 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="$" /&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="898" sParam="" /&gt;
            &lt;Action type="3" message="1701" wParam="0" lParam="1609" sParam="" /&gt;
        &lt;/Macro&gt;
        &lt;Macro name="Spintax to List (Selection Only)" Ctrl="no" Alt="yes" Shift="yes" Key="221"&gt;
            &lt;Action type="3" message="1700" wParam="0" lParam="0" sParam="" /&gt;
            &lt;Action type="3" message="1601" wParam="0" lParam="0" sParam="{" /&gt;
            &lt;Action type="3" message="1625" wParam="0" lParam="1" sParam="" /&gt;
            &lt;Action type="3" message="1602" wParam="0" lParam="0" sParam="" /&gt;
            &lt;Action type="3" message="1702" wParam="0" lParam="898" 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="}" /&gt;
            &lt;Action type="3" message="1625" wParam="0" lParam="1" sParam="" /&gt;
            &lt;Action type="3" message="1602" wParam="0" lParam="0" sParam="" /&gt;
            &lt;Action type="3" message="1702" wParam="0" lParam="898" 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="|" /&gt;
            &lt;Action type="3" message="1625" wParam="0" lParam="1" 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="898" sParam="" /&gt;
            &lt;Action type="3" message="1701" wParam="0" lParam="1609" sParam="" /&gt;
        &lt;/Macro&gt;
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/topic/23489/having-trouble-getting-a-macro-to-work-as-desired</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Jul 2026 13:58:55 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/23489.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 16 Sep 2022 01:22:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Having trouble getting a macro to work as desired on Fri, 16 Sep 2022 13:25:06 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/79839">Having trouble getting a macro to work as desired</a>:</p>
<blockquote>
<p dir="auto">put the example text in the same kind of text box you used for the macro XML</p>
</blockquote>
<p dir="auto">I was going to add that in my reply, but I suspect OP doesn’t really know how he obtained that nice boxed-in formatting for his macros, so telling him to “do that again” may be pointless.  :-)</p>
<p dir="auto">But here’s how it happened:</p>
<p dir="auto">He copied+pasted full lines from <code>shortcuts.xml</code> and because those lines have leading whitespace, the forum software thinks it is code and puts it in a nice code block.</p>
<p dir="auto">Probably any sample text the OP provides would not have that characteristic, and would need manual formatting to get the proper result.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/79841</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/79841</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 16 Sep 2022 13:25:06 GMT</pubDate></item><item><title><![CDATA[Reply to Having trouble getting a macro to work as desired on Fri, 16 Sep 2022 13:05:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/discgolfdc" aria-label="Profile: discgolfdc">@<bdi>discgolfdc</bdi></a> said in <a href="/post/79825">Having trouble getting a macro to work as desired</a>:</p>
<blockquote>
<p dir="auto">I first got dropped off at the Search/Replace desk, but I’m not sure this belongs there, as I’m not having problems with S/R, but with the macro I recorded that is supposed to govern it.</p>
</blockquote>
<blockquote>
<p dir="auto">I’m including the macro codes here</p>
</blockquote>
<p dir="auto">While having the macros here will help someone here help you, I have no clue whether any of the regulars here knows anything about “spintaxt” (I know I don’t).  As such, we don’t have any “spintaxt” lying around – or be able to tell the difference between “it didn’t look quite how I’d hoped” vs “it looked exactly like what I wanted”.  It may be difficult, then, for us to help you debug.</p>
<p dir="auto">On the other hand, if you had provided us with example “before” text, and examples of “after” text that you <em>want</em> vs the “after” text that you actually got, <em>then</em> we might have enough information to start helping you.</p>
<p dir="auto">To share that example text, please use the formatting described in the FAQ entries on search/replace template and the formatting-your-posts – basically, put the example text in the same kind of text box you used for the macro XML.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/79839</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/79839</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 16 Sep 2022 13:05:27 GMT</pubDate></item><item><title><![CDATA[Reply to Having trouble getting a macro to work as desired on Fri, 16 Sep 2022 13:02:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/discgolfdc" aria-label="Profile: discgolfdc">@<bdi>discgolfdc</bdi></a></p>
<p dir="auto">It would probably help if you provide a sample of some text it goes wrong on and of course indicate what the selected-text is in that.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/79838</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/79838</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 16 Sep 2022 13:02:54 GMT</pubDate></item></channel></rss>