<?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[HELP HOW TO INSERT text into blank lines with macro]]></title><description><![CDATA[<p dir="auto">i am trying to create a macro to replace lines in 2 different g codes.<br />
i am almost there.<br />
my last problem is. i have a line that i need to insert a blank space below it and add text into it.<br />
i can find the line by finding letters in it.<br />
i can create a blank line under it, but i cant find a way to add text to that line.<br />
this needs to be all doable in macro as there is a few times it needs to repeat the process.<br />
is there a way to insert txt into blank lines under macro?<br />
or better<br />
as in find and replace, is there a way to do find text then add a blank below and add text to it.<br />
your knowledge would be very much appreciated</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/25763/help-how-to-insert-text-into-blank-lines-with-macro</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Apr 2026 07:07:21 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/25763.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 09 May 2024 18:21:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to HELP HOW TO INSERT text into blank lines with macro on Thu, 09 May 2024 20:29:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@Alan-Kilborn</a> said in <a href="/post/94735">HELP HOW TO INSERT text into blank lines with macro</a>:</p>
<blockquote>
<p dir="auto">$0M50</p>
</blockquote>
<p dir="auto">HI THANKYOU.<br />
I CAN MAKE THAT WORK!!<br />
MUCH APPRECIATED</p>
]]></description><link>https://community.notepad-plus-plus.org/post/94741</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/94741</guid><dc:creator><![CDATA[Steve Trevella]]></dc:creator><pubDate>Thu, 09 May 2024 20:29:49 GMT</pubDate></item><item><title><![CDATA[Reply to HELP HOW TO INSERT text into blank lines with macro on Thu, 09 May 2024 20:29:17 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">You aren’t reading the solutions at all.</p>
</blockquote>
<p dir="auto">This is true.<br />
And the attention-to-detail aspect is getting worse, not better.  :-(<br />
We can’t help those that won’t help themselves.</p>
<p dir="auto">Notes:</p>
<ul>
<li><code>g0</code> suddenly somehow became <code>G00</code></li>
<li>no one said to use <code>\r</code> in the Replace without a <code>\n</code> following</li>
<li>it sure looks like there is a space between <code>(?-s)</code> and <code>G00</code> in the Find</li>
</ul>
]]></description><link>https://community.notepad-plus-plus.org/post/94739</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/94739</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 09 May 2024 20:29:17 GMT</pubDate></item><item><title><![CDATA[Reply to HELP HOW TO INSERT text into blank lines with macro on Thu, 09 May 2024 20:21:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/30690">@Steve-Trevella</a><br />
You aren’t reading the solutions at all. Search mode is “regular expression” not “normal”!</p>
<p dir="auto">Also you could remove the tick boxes on match whole words and match case.</p>
<p dir="auto">Terry</p>
]]></description><link>https://community.notepad-plus-plus.org/post/94737</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/94737</guid><dc:creator><![CDATA[Terry R]]></dc:creator><pubDate>Thu, 09 May 2024 20:21:44 GMT</pubDate></item><item><title><![CDATA[Reply to HELP HOW TO INSERT text into blank lines with macro on Thu, 09 May 2024 20:19:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@Alan-Kilborn</a><br />
<img src="/assets/uploads/files/1715285956605-983ddc1a-0fd4-42ba-ad82-ec63cafb60ce-image.png" alt="983ddc1a-0fd4-42ba-ad82-ec63cafb60ce-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/post/94736</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/94736</guid><dc:creator><![CDATA[Steve Trevella]]></dc:creator><pubDate>Thu, 09 May 2024 20:19:24 GMT</pubDate></item><item><title><![CDATA[Reply to HELP HOW TO INSERT text into blank lines with macro on Thu, 09 May 2024 20:18:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/30690">@Steve-Trevella</a></p>
<p dir="auto">I’d try:</p>
<p dir="auto">Find: <code>(?-is)^g0.*(\R)</code><br />
Replace: <code>$0M0$1</code><br />
Search mode: Regular expression</p>
<p dir="auto">Also, you can’t just say <code>M10</code> one place in what you want, and <code>m10</code> in another – this just shows us that you can’t pay close attention to detail, and makes it harder to help you.  :-(</p>
]]></description><link>https://community.notepad-plus-plus.org/post/94735</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/94735</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 09 May 2024 20:18:28 GMT</pubDate></item><item><title><![CDATA[Reply to HELP HOW TO INSERT text into blank lines with macro on Thu, 09 May 2024 20:19:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/30690">@Steve-Trevella</a></p>
<p dir="auto">So did you try my solution? Just enter <strong>g0</strong> in place of the “text I want to find” and the <strong>m10</strong> in place of the “text I want to insert”. Don’t forget the search mode must be “regular expression”.</p>
<p dir="auto">Try it on a copy of the file and find next, then replace buttons just so you can see what is happening.</p>
<p dir="auto">Terry</p>
]]></description><link>https://community.notepad-plus-plus.org/post/94734</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/94734</guid><dc:creator><![CDATA[Terry R]]></dc:creator><pubDate>Thu, 09 May 2024 20:19:30 GMT</pubDate></item><item><title><![CDATA[Reply to HELP HOW TO INSERT text into blank lines with macro on Thu, 09 May 2024 20:00:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/12335">@Terry-R</a> thanks for your reply.<br />
i have a line. for example<br />
g0 x26 y68<br />
g1 x45 y67<br />
i want to add M10<br />
between those 2 lines<br />
this needs to happen a few times<br />
the only common character is g0,<br />
with the find i worked out with each g0 i can create a empty line below it<br />
but can not see how to add m10 to that space line using the macro.<br />
there may be 20 to 50 times in each file so macro is the way i need to do it.<br />
i am not familiar with the stuff… i have managed to work out how to find and replace all the other lines that need to change… but this has me stumped??</p>
]]></description><link>https://community.notepad-plus-plus.org/post/94733</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/94733</guid><dc:creator><![CDATA[Steve Trevella]]></dc:creator><pubDate>Thu, 09 May 2024 20:00:15 GMT</pubDate></item><item><title><![CDATA[Reply to HELP HOW TO INSERT text into blank lines with macro on Thu, 09 May 2024 19:12:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/30690">@Steve-Trevella</a> said in <a href="/post/94729">HELP HOW TO INSERT text into blank lines with macro</a>:</p>
<blockquote>
<p dir="auto">your knowledge would be very much appreciated</p>
</blockquote>
<p dir="auto">I would be doing what you require using a regular expression (regex). You seem to already be familiar with the Replace function.</p>
<p dir="auto">So a suitable regex for your situation would be:<br />
Find What:<code>(?-s)(text i want to find.?)</code><br />
Replace With:<code>${1}\r\ntext I want to insert</code><br />
Search mode is regular expression.</p>
<p dir="auto">So this finds the text you are looking for (obviously you need to replace the text I’ve used with <strong>your look for</strong> and <strong>inserted</strong> text) and continues to capture to the end of line (excluding the line feed/cariage return). The replace portion inserts a new line feed/carriage return, then the new text. The original line feed/carriage return is still there and now appends the new line inserted.</p>
<p dir="auto">And as you refer to a macro, which is just the keystrokes recorded of the replace function with the fields as described above.</p>
<p dir="auto">If this doesn’t suit you might have to provide an example as some of what you say isn’t entirely clear.</p>
<p dir="auto">Terry</p>
]]></description><link>https://community.notepad-plus-plus.org/post/94730</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/94730</guid><dc:creator><![CDATA[Terry R]]></dc:creator><pubDate>Thu, 09 May 2024 19:12:35 GMT</pubDate></item></channel></rss>