<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<title>ClipboardFusion RSS: Applying a macro twice?</title>
<atom:link href="https://www.clipboardfusion.com/Discussions/RSS/?TopicID=018af743-e139-7134-ad07-497843c29966" rel="self" type="application/rss+xml" />
<link>https://www.clipboardfusion.com/Discussions/RSS/?TopicID=018af743-e139-7134-ad07-497843c29966</link>
<description>ClipboardFusion RSS: Applying a macro twice?</description>
<lastBuildDate>Tue, 19 May 2026 08:08:01 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.clipboardfusion.com/Discussions/RSS/?TopicID=018af743-e139-7134-ad07-497843c29966</generator>
<item>
<title>RE: Applying a macro twice?</title>
<link>https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#27</link>
<pubDate>Thu, 14 Mar 2024 13:45:23 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#27</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Just having it closed should be fine. I've tested this on a few different machines with your backup and it seems to work on all of them.
Do you have another machine you could test this out on?]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Just having it closed should be fine. I've tested this on a few different machines with your backup and it seems to work on all of them. <br/>
<br/>
Do you have another machine you could test this out on?
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Applying a macro twice?</title>
<link>https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#26</link>
<pubDate>Mon, 11 Mar 2024 19:48:01 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#26</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Yes, I have PowerAutomate installed. However, even if I quit the PowerAutomate it still does not work. You think I should uninstall the app?
It actualy places whatever I copied last into the pinned slot of the macro in question.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Yes, I have PowerAutomate installed. However, even if I quit the PowerAutomate it still does not work. You think I should uninstall the app?<br/>
<br/>
It actualy places whatever I copied last into the pinned slot of the macro in question.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Applying a macro twice?</title>
<link>https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#25</link>
<pubDate>Fri, 08 Mar 2024 13:49:18 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#25</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Thanks for sending that over. Do you have any other apps that might be interfereing here, like the "Power Automate Desktop" app?]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Thanks for sending that over. Do you have any other apps that might be interfereing here, like the "Power Automate Desktop" app?
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Applying a macro twice?</title>
<link>https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#24</link>
<pubDate>Thu, 29 Feb 2024 15:44:41 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#24</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Sorry for the wait. Here is the file.
Thank you.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Sorry for the wait. Here is the file.<br/>
Thank you.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Applying a macro twice?</title>
<link>https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#23</link>
<pubDate>Fri, 23 Feb 2024 19:08:15 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#23</guid>
<category>ClipboardFusion</category>
<description><![CDATA[That's really strange, it works fine on my end with your settings as well.
Could you send me a copy of your troubleshooting info? Here are the steps:
Open the Settings  Troubleshooting tab
Click the "Export Info to File" button
Reply with the file attached]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
That's really strange, it works fine on my end with your settings as well.<br/>
<br/>
Could you send me a copy of your troubleshooting info? Here are the steps:<br/>
<br/>
<ul class="ListBullet">
<li>Open the Settings > Troubleshooting tab</li>
<li>Click the "Export Info to File" button</li>
<li>Reply with the file attached</li></ul>
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Applying a macro twice?</title>
<link>https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#22</link>
<pubDate>Thu, 22 Feb 2024 19:56:23 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#22</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Sure thing.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Sure thing.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Applying a macro twice?</title>
<link>https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#21</link>
<pubDate>Thu, 22 Feb 2024 19:45:41 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#21</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Could you send me a backup of your settings? You can grab them from the ClipboardFusion Settings  Options  Export Settings]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Could you send me a backup of your settings? You can grab them from the ClipboardFusion Settings > Options > Export Settings
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Applying a macro twice?</title>
<link>https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#20</link>
<pubDate>Tue, 20 Feb 2024 20:50:36 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#20</guid>
<category>ClipboardFusion</category>
<description><![CDATA[For now I'm trying only with one of the slots, putting 1 where Pin Slot number goes.
Just weird that it does not copy it to the designated slot.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
For now I'm trying only with one of the slots, putting 1 where Pin Slot number goes.<br/>
<br/>
Just weird that it does not copy it to the designated slot.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Applying a macro twice?</title>
<link>https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#19</link>
<pubDate>Tue, 20 Feb 2024 15:08:04 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#19</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Strange, it seems to work fine here. Are you changing the "0" on line 24 to a 1, 2, 3, for slots 1, 2, 3, etc.?]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Strange, it seems to work fine here. Are you changing the "0" on line 24 to a 1, 2, 3, for slots 1, 2, 3, etc.?
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Applying a macro twice?</title>
<link>https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#18</link>
<pubDate>Fri, 16 Feb 2024 15:00:50 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#18</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Thank you for your help.
I tried it, but it does not place the copied text to the designated Pinned Slot.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Thank you for your help.<br/>
<br/>
I tried it, but it does not place the copied text to the designated Pinned Slot.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Applying a macro twice?</title>
<link>https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#17</link>
<pubDate>Fri, 16 Feb 2024 14:56:07 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#17</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Ah okay, try this then:
Code
Copy
Select All
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
// The 'text' parameter will contain the text from the:
//   - Current Clipboard when run by HotKey
//   - History Item when run from the History Menu
// Th...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Ah okay, try this then: <br/>
<br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019e3f470c3b71f9bee285445acade56" class="ClipboardCopyControl"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e3f470c3b71f9bee285445acade56Js'); return false;"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019e3f470c3b71f9bee285445acade56Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;

// The 'text' parameter will contain the text from the:
//   - Current Clipboard when run by HotKey
//   - History Item when run from the History Menu
// The returned string will be:
//   - Placed directly on the Clipboard
//   - Ignored by ClipboardFusion if it is 'null'
public static class ClipboardFusionHelper
{
    public static string ProcessText(string text)
    {
        int localPinnedItemCount = BFS.ClipboardFusion.GetLocalPinnedItemCount();
        if (localPinnedItemCount &lt; 10)
        {
            for (int i = localPinnedItemCount; i &lt; 10; i++)
            {
                BFS.ClipboardFusion.AddLocalPinnedText("--placeholder--");
            }
        }    
        BFS.ClipboardFusion.RunMacro("Remove Extra White Spaces and Trim", text, out string output);
        BFS.ClipboardFusion.SetLocalPinnedText(0, output);
        return null;
    }
}</pre><textarea id="code019e3f470c3b71f9bee285445acade56" name="code019e3f470c3b71f9bee285445acade56" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Applying a macro twice?</title>
<link>https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#16</link>
<pubDate>Thu, 15 Feb 2024 17:32:47 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#16</guid>
<category>ClipboardFusion</category>
<description><![CDATA[I'll try it but in this macros I only want to trim the white space before and anfter, I don't want to apply the first marco that does the Title Case change.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I'll try it but in this macros I only want to trim the white space before and anfter, I don't want to apply the first marco that does the Title Case change.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Applying a macro twice?</title>
<link>https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#15</link>
<pubDate>Thu, 15 Feb 2024 16:16:15 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#15</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Try this:
Code
Copy
Select All
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
// The 'text' parameter will contain the text from the:
//   - Current Clipboard when run by HotKey
//   - History Item when run from the History Menu
// The returned str...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Try this: <br/>
<br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019e3f470c5171308bfcfb246c2cdc87" class="ClipboardCopyControl"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e3f470c5171308bfcfb246c2cdc87Js'); return false;"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019e3f470c5171308bfcfb246c2cdc87Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;

// The 'text' parameter will contain the text from the:
//   - Current Clipboard when run by HotKey
//   - History Item when run from the History Menu
// The returned string will be:
//   - Placed directly on the Clipboard
//   - Ignored by ClipboardFusion if it is 'null'
public static class ClipboardFusionHelper
{
    public static string ProcessText(string text)
    {
        int localPinnedItemCount = BFS.ClipboardFusion.GetLocalPinnedItemCount();
        if (localPinnedItemCount &lt; 10)
        {
            for (int i = localPinnedItemCount; i &lt; 10; i++)
            {
                BFS.ClipboardFusion.AddLocalPinnedText("--placeholder--");
            }
        }    
        BFS.ClipboardFusion.RunMacro("Convert Text to Title Case (Smart)", text, out string output);
        BFS.ClipboardFusion.RunMacro("Remove Extra White Spaces and Trim", output, out string output2);
        BFS.ClipboardFusion.SetLocalPinnedText(0, output2);
        return null;
    }
}</pre><textarea id="code019e3f470c5171308bfcfb246c2cdc87" name="code019e3f470c5171308bfcfb246c2cdc87" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Applying a macro twice?</title>
<link>https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#14</link>
<pubDate>Wed, 14 Feb 2024 19:41:33 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#14</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Now the Verify Function gives OK.
However, whatever I select it does not copy it to any Pinned Location... it does not copy it anywhere. I can't see the copied text in the Clipboard Manager.
Here are the last code lines, as per your suggestion, set to store the copied content to Pinned Location...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Now the Verify Function gives OK.<br/>
However, whatever I select it does not copy it to any Pinned Location... it does not copy it anywhere. I can't see the copied text in the Clipboard Manager.<br/>
<br/>
Here are the last code lines, as per your suggestion, set to store the copied content to Pinned Location #2:<br/>
<br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019e3f470c5d731994ccd0272d44f096" class="ClipboardCopyControl"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e3f470c5d731994ccd0272d44f096Js'); return false;"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019e3f470c5d731994ccd0272d44f096Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">.
    .
    BFS.ClipboardFusion.RunMacro("Remove Extra White Spaces and Trim", text, out string output);
    Regex regex = new Regex(@" {2,}");
    return regex.Replace(output, " ").Trim();
    BFS.ClipboardFusion.SetLocalPinnedText(1, output);
    return null;
    .
    .</pre><textarea id="code019e3f470c5d731994ccd0272d44f096" name="code019e3f470c5d731994ccd0272d44f096" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Applying a macro twice?</title>
<link>https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#13</link>
<pubDate>Wed, 14 Feb 2024 19:21:54 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#13</guid>
<category>ClipboardFusion</category>
<description><![CDATA[You'll need to add the regex namespace at the start of the script, try this:
Code
Copy
Select All
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
// The 'text' parameter will contain the text from the:
//   - Current Clipboard when run by HotKey
//  ...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
You'll need to add the regex namespace at the start of the script, try this: <br/>
<br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019e3f470c6a71b7bacd5c33dcbd7780" class="ClipboardCopyControl"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e3f470c6a71b7bacd5c33dcbd7780Js'); return false;"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019e3f470c6a71b7bacd5c33dcbd7780Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;

// The 'text' parameter will contain the text from the:
//   - Current Clipboard when run by HotKey
//   - History Item when run from the History Menu
// The returned string will be:
//   - Placed directly on the Clipboard
//   - Ignored by ClipboardFusion if it is 'null'
public static class ClipboardFusionHelper
{
    public static string ProcessText(string text)
    {
        int localPinnedItemCount = BFS.ClipboardFusion.GetLocalPinnedItemCount();
        if (localPinnedItemCount &lt; 10)
        {
            for (int i = localPinnedItemCount; i &lt; 10; i++)
            {
                BFS.ClipboardFusion.AddLocalPinnedText("--placeholder--");
            }
        }
        BFS.ClipboardFusion.RunMacro("Convert Text to Title Case (Smart)", text, out string output);
        Regex regex = new Regex(@" {2,}");
        return regex.Replace(output, " ").Trim();
        BFS.ClipboardFusion.SetLocalPinnedText(0, output);
        return null;
    }
}</pre><textarea id="code019e3f470c6a71b7bacd5c33dcbd7780" name="code019e3f470c6a71b7bacd5c33dcbd7780" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Applying a macro twice?</title>
<link>https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#12</link>
<pubDate>Fri, 09 Feb 2024 16:14:44 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#12</guid>
<category>ClipboardFusion</category>
<description><![CDATA[You say it should be like this:
Code
Copy
Select All
using System;
using System.Collections.Generic;
// The 'text' parameter will contain the text from the:
//   - Current Clipboard when run by HotKey
//   - History Item when run from the History Menu
// The returned string will be:
// ...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
You say it should be like this:<br/>
<br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019e3f470c7277d1a994f5b785a66af6" class="ClipboardCopyControl"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e3f470c7277d1a994f5b785a66af6Js'); return false;"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019e3f470c7277d1a994f5b785a66af6Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">using System;
using System.Collections.Generic;

// The 'text' parameter will contain the text from the:
//   - Current Clipboard when run by HotKey
//   - History Item when run from the History Menu
// The returned string will be:
//   - Placed directly on the Clipboard
//   - Ignored by ClipboardFusion if it is 'null'
public static class ClipboardFusionHelper
{
    public static string ProcessText(string text)
    {
        int localPinnedItemCount = BFS.ClipboardFusion.GetLocalPinnedItemCount();
        if (localPinnedItemCount &lt; 10)
        {
            for (int i = localPinnedItemCount; i &lt; 10; i++)
            {
                BFS.ClipboardFusion.AddLocalPinnedText("--placeholder--");
            }
        }    
        BFS.ClipboardFusion.SetLocalPinnedText(1, BFS.Clipboard.CopyText());
        Regex regex = new Regex(@" {2,}");
        return regex.Replace(output, " ").Trim();
        return null;
    }
}</pre><textarea id="code019e3f470c7277d1a994f5b785a66af6" name="code019e3f470c7277d1a994f5b785a66af6" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
If I do that and then click on Verify Function I get all kinds of error. Ignoring the<br/>
error and applying the macro does not give desired result.<br/>
<br/>
Thank you for your help.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Applying a macro twice?</title>
<link>https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#11</link>
<pubDate>Fri, 09 Feb 2024 16:05:52 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#11</guid>
<category>ClipboardFusion</category>
<description><![CDATA[I think you'll just want this code directly in between line 22 and 23:
Code
Copy
Select All
Regex regex = new Regex(@" {2,}");
return regex.Replace(output, " ").Trim();]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I think you'll just want this code directly in between line 22 and 23: <br/>
<br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019e3f470c797238a1b534c8b98826ce" class="ClipboardCopyControl"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e3f470c797238a1b534c8b98826ceJs'); return false;"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019e3f470c797238a1b534c8b98826ceJs" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">Regex regex = new Regex(@" {2,}");
return regex.Replace(output, " ").Trim();</pre><textarea id="code019e3f470c797238a1b534c8b98826ce" name="code019e3f470c797238a1b534c8b98826ce" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Applying a macro twice?</title>
<link>https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#10</link>
<pubDate>Tue, 06 Feb 2024 19:35:21 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#10</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Well, I'm using tha macros Keith made to copy directly to a specific pinned slot 0 to 9, but I want to run a macro on it, just like we did few posts before.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Well, I'm using tha macros Keith made to copy directly to a specific pinned slot 0 to 9, but I want to run a macro on it, just like we did few posts before.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Applying a macro twice?</title>
<link>https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#9</link>
<pubDate>Tue, 06 Feb 2024 18:24:52 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#9</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Are you copying the text, running the macro, and then pasting?]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Are you copying the text, running the macro, and then pasting?
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Applying a macro twice?</title>
<link>https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#8</link>
<pubDate>Mon, 05 Feb 2024 19:09:13 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#8</guid>
<category>ClipboardFusion</category>
<description><![CDATA[I tried applying the same logic for anoter macro named "Remove Extra White Spaces and Trim" (code bellow) but for some reason it just copies the last item from the normal clipboard.
Code
Copy
Select All
using System;
using System.Text.RegularExpressions;
public static class ClipboardFusionH...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I tried applying the same logic for anoter macro named "Remove Extra White Spaces and Trim" (code bellow) but for some reason it just copies the last item from the normal clipboard.<br/>
<br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019e3f470c8b7286ad8b99cdaa090af3" class="ClipboardCopyControl"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e3f470c8b7286ad8b99cdaa090af3Js'); return false;"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019e3f470c8b7286ad8b99cdaa090af3Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">using System;
using System.Text.RegularExpressions;

public static class ClipboardFusionHelper
  {
    public static string ProcessText(string text)
      {
         Regex regex = new Regex(@" {2,}");
         return regex.Replace(text, " ").Trim();
      }
  }</pre><textarea id="code019e3f470c8b7286ad8b99cdaa090af3" name="code019e3f470c8b7286ad8b99cdaa090af3" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
Anny ideas?
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Applying a macro twice?</title>
<link>https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#7</link>
<pubDate>Fri, 06 Oct 2023 14:33:09 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#7</guid>
<category>ClipboardFusion</category>
<description><![CDATA[I figured it out.
The line after running the macro in your script is:
Code
Copy
Select All
BFS.ClipboardFusion.SetLocalPinnedText(0, output);
and in my script is:
Code
Copy
Select All
BFS.ClipboardFusion.SetLocalPinnedText(0, BFS.Clipboard.CopyText());
Now it works.
Thanks!]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I figured it out.<br/>
<br/>
The line after running the macro in your script is:<br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019e3f470c92749697e60fe2381e2fa6" class="ClipboardCopyControl"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e3f470c92749697e60fe2381e2fa6Js'); return false;"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019e3f470c92749697e60fe2381e2fa6Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">BFS.ClipboardFusion.SetLocalPinnedText(0, output);</pre><textarea id="code019e3f470c92749697e60fe2381e2fa6" name="code019e3f470c92749697e60fe2381e2fa6" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
and in my script is:<br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019e3f470c947506bcc3549ca3fef107" class="ClipboardCopyControl"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e3f470c947506bcc3549ca3fef107Js'); return false;"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019e3f470c947506bcc3549ca3fef107Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">BFS.ClipboardFusion.SetLocalPinnedText(0, BFS.Clipboard.CopyText());</pre><textarea id="code019e3f470c947506bcc3549ca3fef107" name="code019e3f470c947506bcc3549ca3fef107" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
Now it works. <br/>
<br/>
Thanks! <img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/face-smile.light.svg" alt=":)" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:16px;height:16px;" HelpButtonData=":)" HelpButtonDataAlign="BelowMiddle" />
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Applying a macro twice?</title>
<link>https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#6</link>
<pubDate>Fri, 06 Oct 2023 13:15:09 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#6</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Strange, it seems to work here. Try importing the script directly from the attachment below.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Strange, it seems to work here. Try importing the script directly from the attachment below.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Applying a macro twice?</title>
<link>https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#5</link>
<pubDate>Thu, 05 Oct 2023 18:20:07 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#5</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Quote:
The format for the line will look like this: BFS.ClipboardFusion.RunMacro("Convert Text to Title Case (Smart)", text, out string output);
and you'll want to add it right before it pins into ClipboardFusion on line 22, so it should look like this:
Code
Copy
Select All
using System;
u...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
<div class="BackGrey"><div class="Text"><div><b>Quote:</b></div>The format for the line will look like this: BFS.ClipboardFusion.RunMacro("Convert Text to Title Case (Smart)", text, out string output);<br/>
<br/>
and you'll want to add it right before it pins into ClipboardFusion on line 22, so it should look like this:<br/>
<br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019e3f470ca1713ea1e21dfee865ee5a" class="ClipboardCopyControl"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e3f470ca1713ea1e21dfee865ee5aJs'); return false;"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019e3f470ca1713ea1e21dfee865ee5aJs" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">using System;
using System.Collections.Generic;
....
        }
        BFS.ClipboardFusion.RunMacro("Convert Text to Title Case (Smart)", text, out string output);
        BFS.ClipboardFusion.SetLocalPinnedText(0, output);
        return null;
    }
}</pre><textarea id="code019e3f470ca1713ea1e21dfee865ee5a" name="code019e3f470ca1713ea1e21dfee865ee5a" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div></div></div><br/>
<br/>
I did as you suggested but it does not Run the Macro in question... it makes no changes to the text I pasted.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Applying a macro twice?</title>
<link>https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#4</link>
<pubDate>Thu, 05 Oct 2023 17:29:17 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#4</guid>
<category>ClipboardFusion</category>
<description><![CDATA[The format for the line will look like this: BFS.ClipboardFusion.RunMacro("Convert Text to Title Case (Smart)", text, out string output);
and you'll want to add it right before it pins into ClipboardFusion on line 22, so it should look like this:
Code
Copy
Select All
using System;
using Sys...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
The format for the line will look like this: BFS.ClipboardFusion.RunMacro("Convert Text to Title Case (Smart)", text, out string output);<br/>
<br/>
and you'll want to add it right before it pins into ClipboardFusion on line 22, so it should look like this:<br/>
<br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019e3f470cac763fbc9f93afea4c5c8c" class="ClipboardCopyControl"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e3f470cac763fbc9f93afea4c5c8cJs'); return false;"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019e3f470cac763fbc9f93afea4c5c8cJs" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">using System;
using System.Collections.Generic;

// The 'text' parameter will contain the text from the:
//   - Current Clipboard when run by HotKey
//   - History Item when run from the History Menu
// The returned string will be:
//   - Placed directly on the Clipboard
//   - Ignored by ClipboardFusion if it is 'null'
public static class ClipboardFusionHelper
{
    public static string ProcessText(string text)
    {
        int localPinnedItemCount = BFS.ClipboardFusion.GetLocalPinnedItemCount();
        if (localPinnedItemCount &lt; 10)
        {
            for (int i = localPinnedItemCount; i &lt; 10; i++)
            {
                BFS.ClipboardFusion.AddLocalPinnedText("--placeholder--");
            }
        }
        BFS.ClipboardFusion.RunMacro("Convert Text to Title Case (Smart)", text, out string output);
        BFS.ClipboardFusion.SetLocalPinnedText(0, output);
        return null;
    }
}</pre><textarea id="code019e3f470cac763fbc9f93afea4c5c8c" name="code019e3f470cac763fbc9f93afea4c5c8c" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Applying a macro twice?</title>
<link>https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#3</link>
<pubDate>Thu, 05 Oct 2023 14:28:49 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/applying-a-macro-twice/?ID=018af743-e139-7134-ad07-497843c29966#3</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Quote:
You can add the "BFS.ClipboardFusion.RunMacro" line to your script to run it twice
Sorry, not a programmer. If this is my script, how do I make it run the macro Convert Text to Title Case (Smart)?
I assume I should have the macro in question downloaded first.
Code
Copy
Select All
us...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
<div class="BackGrey"><div class="Text"><div><b>Quote:</b></div>You can add the "BFS.ClipboardFusion.RunMacro" line to your script to run it twice</div></div><br/>
<br/>
Sorry, not a programmer. If this is my script, how do I make it run the macro Convert Text to Title Case (Smart)?<br/>
I assume I should have the macro in question downloaded first.<br/>
<br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019e3f470cb3746e8a59361aea8b6be1" class="ClipboardCopyControl"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e3f470cb3746e8a59361aea8b6be1Js'); return false;"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019e3f470cb3746e8a59361aea8b6be1Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">using System;
using System.Collections.Generic;

// The 'text' parameter will contain the text from the:
//   - Current Clipboard when run by HotKey
//   - History Item when run from the History Menu
// The returned string will be:
//   - Placed directly on the Clipboard
//   - Ignored by ClipboardFusion if it is 'null'
public static class ClipboardFusionHelper
{
    public static string ProcessText(string text)
    {
        int localPinnedItemCount = BFS.ClipboardFusion.GetLocalPinnedItemCount();
        if (localPinnedItemCount &lt; 10)
        {
            for (int i = localPinnedItemCount; i &lt; 10; i++)
            {
                BFS.ClipboardFusion.AddLocalPinnedText("--placeholder--");
            }
        }    
        BFS.ClipboardFusion.SetLocalPinnedText(0, BFS.Clipboard.CopyText());
        return null;
    }
}</pre><textarea id="code019e3f470cb3746e8a59361aea8b6be1" name="code019e3f470cb3746e8a59361aea8b6be1" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
</channel>
</rss>