<div class="markdown">
<p dir="auto">On 19 Sep 2013, at 15:00, Ross Ahmed wrote:</p>

<blockquote>
<p dir="auto">Is it possible to save a macro that uses the find & replace dialogue box?</p>
</blockquote>

<p dir="auto">Yes, the button you press in the dialog, while recording a macro, will cause the window’s current state to be saved (in the macro) with the action, as opposed to using something like Edit → Find → Find Next, which only put “findNext:” in the macro (using the current search string).</p>

<blockquote>
<p dir="auto">Lets say I want to save a macro that uses find & replace with a regular expression to surround any number with “<strong>". For example, the macro would replace any instances of “123" with **123</strong>. Is this possible?</p>
</blockquote>

<ol>
<li value=1>Edit → Macros → Toggle Recording</li>
<li value=2>Edit → Find → Find…</li>
<li value=3>In find dialog use:

<ul>
<li>Find: <code>\d+</code></li>
<li>Replace: <code>**$0**</code></li>
<li>✓ Regular Expression</li>
</ul></li>
<li value=4>Click “Replace All”</li>
<li value=5>Edit → Macros → Toggle Recording</li>
<li value=6>Edit → Macros → Save Macro…</li>
</ol>

<p dir="auto">When you save the macro, you can see how your actions got interpreted and can make minor edits to the property list in the bundle editor.</p>

</div>