<?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[Macro problem with ctrl + x &#x2F; ctrl + v]]></title><description><![CDATA[<p dir="auto">I’m trying to make a macro that takes (ctrl + x) a code from a list in tab 1 so look in tab 2 for that same code, copy the line and return to tab 1 and paste.</p>
<p dir="auto">Tab 1<br />
h03be4be1gcf1ag4d74gb8c0g03b3c73f62aa<br />
h03d68e95gf675g401eg8dd5g0a62b8e4a91e<br />
h03df7a6dgdaa9g40c5g87c0g4e0887602289<br />
h040ae8ebg66eag4e98gb1b1ga42dc42160be<br />
…</p>
<p dir="auto">Tab 2<br />
&lt;content contentuid=“h03be4be1gcf1ag4d74gb8c0g03b3c73f62aa”&gt;<em>You make out one ruined line: 'the champion must offer a burning stone to the dragon's mouth.'</em>&lt;/content&gt;<br />
&lt;content contentuid=“h03df7a6dgdaa9g40c5g87c0g4e0887602289”&gt;<em>A man's spirit stands before you, clad in scholarly dress. When your eyes meet, he staggers back, terrified.</em>&lt;/content&gt;<br />
&lt;content contentuid=“h037bc53cg9603g4cdbg94c7g190d8dfbbbc8”&gt;<em>As the memory fades, ghostly flames flicker on the surface of the polished sabatons.</em>&lt;/content&gt;<br />
…</p>
<p dir="auto">I try to record macro<br />
-shif + end         (in code aba1)<br />
-ctrl + x              (code)<br />
-ctrl + pgdown  (for tab2)<br />
-ctrl + f<br />
-ctrl + v              (find the code)<br />
-enter                (find the code)<br />
-esc<br />
-Home               (code line in tab 2)<br />
-shfit + end<br />
-ctrl + c             (copy line from tab 2)<br />
-ctrl + pgdown (return to tab1)<br />
-ctrl + c             (paste the tab 2 line in place of the tab 1 line now empty by shift + x)<br />
-down<br />
-Home (to start the cycle again)</p>
<p dir="auto">But what happens is that the macro always only returns the same first line copied from tab 2.</p>
<p dir="auto">For example<br />
As the first code is <strong>h03be4be1gcf1ag4d74gb8c0g03b3c73f62aa</strong> the line returned from tab 2 is <strong>&lt;content contentuid=“h03be4be1gcf1ag4d74gb8c0g03b3c73f62aa”&gt;<em>You make out one ruined line: 'the champion must offer a burning stone to the dragon's mouth.'</em>&lt;/content&gt;</strong><br />
For every time the macro is repeated</p>
<p dir="auto">Sorry for my bad english is not my native language</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/19804/macro-problem-with-ctrl-x-ctrl-v</link><generator>RSS for Node</generator><lastBuildDate>Fri, 12 Jun 2026 01:53:27 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/19804.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 05 Aug 2020 04:05:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Macro problem with ctrl + x &#x2F; ctrl + v on Wed, 05 Aug 2020 14:06:37 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for the answers<br />
It worked by editing  <strong>%AppData%\Notepad++\ shortcuts.xml</strong> and then <strong>merging the pieces</strong></p>
]]></description><link>https://community.notepad-plus-plus.org/post/56485</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/56485</guid><dc:creator><![CDATA[Noobstein]]></dc:creator><pubDate>Wed, 05 Aug 2020 14:06:37 GMT</pubDate></item><item><title><![CDATA[Reply to Macro problem with ctrl + x &#x2F; ctrl + v on Wed, 05 Aug 2020 13:24:47 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></p>
<p dir="auto">Good technique.</p>
<p dir="auto">I don’t know if your posting makes it totally clear enough (especially if one has never opened a second view) that for it to work one tab must be in one view and the other tab must be in the other view.  But…it should be clear now. :-)</p>
<blockquote>
<p dir="auto">like many of Notepad++'s GUI commands…is not macro-recordable, but it is apparently macro-playable</p>
</blockquote>
<p dir="auto">Sad that more actions aren’t directly macro-recordable, as that’s probably the only way a non-poweruser can achieve some of these things without having help.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/56478</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/56478</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 05 Aug 2020 13:24:47 GMT</pubDate></item><item><title><![CDATA[Reply to Macro problem with ctrl + x &#x2F; ctrl + v on Wed, 05 Aug 2020 13:12:37 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> ,</p>
<p dir="auto">From what I’ve seen in macro recording, if you click anywhere, Scintilla registers that “I clicked in this Scintilla window to activate that editor” using those two messages (start a selection, then stop selecting).</p>
<p dir="auto">Fortunately, like many of Notepad++'s GUI commands, it appears that the toggle-view (<strong>View &gt; Focus on Another View [F8]</strong>) is not macro-recordable, but it is apparently macro-playable as <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/src/menuCmdID.h#L328" rel="nofollow ugc"><code>IDM_VIEW_SWITCHTO_OTHER_VIEW</code> = 44072</a></p>
<pre><code>    &lt;Macro name="changeFocus" Ctrl="no" Alt="no" Shift="no" Key="0"&gt;
        &lt;Action type="2" message="0" wParam="44072" lParam="0" sParam="" /&gt;
    &lt;/Macro&gt;
</code></pre>
<p dir="auto">So <a class="plugin-mentions-user plugin-mentions-a" href="/user/noobstein" aria-label="Profile: Noobstein">@<bdi>Noobstein</bdi></a> , you might be able to make it work by recording the various pieces of your actions, then edit the <code>%AppData%\Notepad++\shortcuts.xml</code> file to merge the pieces, with the</p>
<pre><code>        &lt;Action type="2" message="0" wParam="44072" lParam="0" sParam="" /&gt;
</code></pre>
<p dir="auto">line in between each group.  So the actions would be</p>
<ul>
<li>
<p dir="auto">Activate TAB1</p>
</li>
<li>
<p dir="auto">Start Recording</p>
</li>
<li>
<p dir="auto">perform the TAB1 actions</p>
</li>
<li>
<p dir="auto">Stop recording.  Save macro as TAB1_ACTIONS</p>
</li>
<li>
<p dir="auto">Activate TAB2</p>
</li>
<li>
<p dir="auto">Start Recording</p>
</li>
<li>
<p dir="auto">perform the TAB2 actions</p>
</li>
<li>
<p dir="auto">Stop recording.  Save macro as TAB2_ACTIONS</p>
</li>
<li>
<p dir="auto">Exit all instances of Notepad++</p>
</li>
<li>
<p dir="auto">Edit <code>%AppData%\Notepad++\shortcuts.xml</code></p>
<ul>
<li>
<p dir="auto">Start with something like:</p>
<pre><code>  &lt;Macro name="TAB1_ACTIONS" Ctrl="no" Alt="no" Shift="no" Key="0"&gt;
      &lt;Action ...FIRST... /&gt;
      &lt;Action ... /&gt;
  &lt;/Macro&gt;
  &lt;Macro name="TAB2_ACTIONS" Ctrl="no" Alt="no" Shift="no" Key="0"&gt;
      &lt;Action ... /&gt;
      &lt;Action ...LAST... /&gt;
  &lt;/Macro&gt;
</code></pre>
</li>
<li>
<p dir="auto">Replace with something like:</p>
<pre><code>  &lt;Macro name="JOINED_ACTIONS" Ctrl="no" Alt="no" Shift="no" Key="0"&gt;
      &lt;Action ...FIRST... /&gt;
      &lt;Action ... /&gt;
      &lt;Action type="2" message="0" wParam="44072" lParam="0" sParam="" /&gt;&lt;!-- toggle view --&gt;
      &lt;Action ... /&gt;
      &lt;Action ...LAST... /&gt;
  &lt;/Macro&gt;
</code></pre>
</li>
</ul>
</li>
<li>
<p dir="auto">Save <code>shortcuts.xml</code> and exit Notepad++</p>
</li>
<li>
<p dir="auto">Open new Notepad++</p>
</li>
<li>
<p dir="auto">You should have <code>JOINED_ACTIONS</code> in the Macros menu now.  It might do what you want.</p>
</li>
</ul>
<p dir="auto">Using a similar technique, I created a macro which types “First Tab” in the first tab and “Second Tab” in the second tab:</p>
<pre><code>        &lt;Macro name="forum" Ctrl="no" Alt="no" Shift="no" Key="0"&gt;
            &lt;Action type="1" message="2170" wParam="0" lParam="0" sParam="First Tab&amp;#x000D;&amp;#x000A;" /&gt;
            &lt;Action type="2" message="0" wParam="44072" lParam="0" sParam="" /&gt;
            &lt;Action type="1" message="2170" wParam="0" lParam="0" sParam="Second Tab&amp;#x000D;&amp;#x000A;" /&gt;
        &lt;/Macro&gt;
</code></pre>
<p dir="auto">I verified when I run it, that the two lines are typed in opposite views.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/56477</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/56477</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Wed, 05 Aug 2020 13:12:37 GMT</pubDate></item><item><title><![CDATA[Reply to Macro problem with ctrl + x &#x2F; ctrl + v on Wed, 05 Aug 2020 12:12:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/noobstein" aria-label="Profile: Noobstein">@<bdi>Noobstein</bdi></a></p>
<p dir="auto">Macro operations don’t seem to operate between tabs.  If they did, the simplest operation–switching tabs–would work, and it doesn’t seem to.  Try this:</p>
<ul>
<li>Start macro recording</li>
<li>Switch from one tab to another</li>
<li>Stop macro recording</li>
<li>Replay macro (nothing happens)</li>
</ul>
<p dir="auto">It is curious that macro replay is even enabled after stopping macro recording…hmmm…</p>
<p dir="auto">The recorded macro looks like this:</p>
<pre><code>    &lt;Macro name="test" Ctrl="no" Alt="no" Shift="no" Key="0"&gt;
        &lt;Action type="0" message="2422" wParam="0" lParam="0" sParam="" /&gt;
        &lt;Action type="0" message="2325" wParam="0" lParam="0" sParam="" /&gt;
    &lt;/Macro&gt;
</code></pre>
<p dir="auto">Here are the definitions of those commands:</p>
<ul>
<li>#define SCI_SETSELECTIONMODE 2422</li>
<li>#define SCI_CANCEL 2325</li>
</ul>
<p dir="auto">Doesn’t make a whole lot of sense to me…</p>
]]></description><link>https://community.notepad-plus-plus.org/post/56474</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/56474</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 05 Aug 2020 12:12:26 GMT</pubDate></item></channel></rss>