<?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: Stringing macros together based on copied text</title>
<atom:link href="https://www.clipboardfusion.com/Discussions/RSS/?TopicID=9e01dae7-ac03-48dd-809f-4b74bc2302f6" rel="self" type="application/rss+xml" />
<link>https://www.clipboardfusion.com/Discussions/RSS/?TopicID=9e01dae7-ac03-48dd-809f-4b74bc2302f6</link>
<description>ClipboardFusion RSS: Stringing macros together based on copied text</description>
<lastBuildDate>Fri, 01 May 2026 22:44:04 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.clipboardfusion.com/Discussions/RSS/?TopicID=9e01dae7-ac03-48dd-809f-4b74bc2302f6</generator>
<item>
<title>RE: Stringing macros together based on copied text</title>
<link>https://www.clipboardfusion.com/Discussions/View/stringing-macros-together-based-on-copied-text/?ID=9e01dae7-ac03-48dd-809f-4b74bc2302f6#9</link>
<pubDate>Tue, 01 Oct 2019 16:51:49 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/stringing-macros-together-based-on-copied-text/?ID=9e01dae7-ac03-48dd-809f-4b74bc2302f6#9</guid>
<category>ClipboardFusion</category>
<description><![CDATA[You can change it from:
if (text == "ping")
to:
if (text.Contains("ping"))
Hope that helps!]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
You can change it from:<br/>
<div class="Inline"><pre>if (text == "ping")</pre></div><br/>
<br/>
to:<br/>
<div class="Inline"><pre>if (text.Contains("ping"))</pre></div><br/>
<br/>
Hope that helps!
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Stringing macros together based on copied text</title>
<link>https://www.clipboardfusion.com/Discussions/View/stringing-macros-together-based-on-copied-text/?ID=9e01dae7-ac03-48dd-809f-4b74bc2302f6#8</link>
<pubDate>Mon, 30 Sep 2019 10:25:53 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/stringing-macros-together-based-on-copied-text/?ID=9e01dae7-ac03-48dd-809f-4b74bc2302f6#8</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Yep. That seems to work. But I've just realized I need to actually check for if text contains, not if it equals. I guess I can add a scrubbing of the text it copies, but is there maybe an easier way of implementing into the if statement?]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Yep. That seems to work. But I've just realized I need to actually check for if text contains, not if it equals. I guess I can add a scrubbing of the text it copies, but is there maybe an easier way of implementing into the if statement?
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Stringing macros together based on copied text</title>
<link>https://www.clipboardfusion.com/Discussions/View/stringing-macros-together-based-on-copied-text/?ID=9e01dae7-ac03-48dd-809f-4b74bc2302f6#7</link>
<pubDate>Mon, 30 Sep 2019 10:09:01 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/stringing-macros-together-based-on-copied-text/?ID=9e01dae7-ac03-48dd-809f-4b74bc2302f6#7</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Oh. I see. That makes sense then. I'll try this one out. Thank you.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Oh. I see. That makes sense then. I'll try this one out. Thank you.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Stringing macros together based on copied text</title>
<link>https://www.clipboardfusion.com/Discussions/View/stringing-macros-together-based-on-copied-text/?ID=9e01dae7-ac03-48dd-809f-4b74bc2302f6#6</link>
<pubDate>Tue, 03 Sep 2019 13:28:22 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/stringing-macros-together-based-on-copied-text/?ID=9e01dae7-ac03-48dd-809f-4b74bc2302f6#6</guid>
<category>ClipboardFusion</category>
<description><![CDATA[I put together something that should work for you. All I did was modify your code a little.
The reason your Macro wasn't working is because when a Macro is run, the "text" variable contains the text that was in the Clipboard at the time when the Macro first runs. It doesn't change again automati...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I put together something that should work for you. All I did was modify your code a little.<br/>
<br/>
The reason your Macro wasn't working is because when a Macro is run, the "text" variable contains the text that was in the Clipboard at the time when the Macro first runs. It doesn't change again automatically, unless you change it yourself <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" />.<br/>
<br/>
So the only real change I made to your Macro was on line 12. I change the <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="#code019de5b69fc37054af78bf87e1ee936a" 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('code019de5b69fc37054af78bf87e1ee936aJs'); 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="code019de5b69fc37054af78bf87e1ee936aJs" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">BFS.Clipboard.CopyText();</pre><textarea id="code019de5b69fc37054af78bf87e1ee936a" name="code019de5b69fc37054af78bf87e1ee936a" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
to<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="#code019de5b69fc77704910f16fd027ad158" 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('code019de5b69fc77704910f16fd027ad158Js'); 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="code019de5b69fc77704910f16fd027ad158Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">text = BFS.Clipboard.CopyText();</pre><textarea id="code019de5b69fc77704910f16fd027ad158" name="code019de5b69fc77704910f16fd027ad158" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
Anyways, here's the code!<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="#code019de5b69fc977898c2f136f0d503133" 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('code019de5b69fc977898c2f136f0d503133Js'); 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="code019de5b69fc977898c2f136f0d503133Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">public static class ClipboardFusionHelper
{
    public static string ProcessText(string text)
    {
        BFS.Input.SetMousePosition(-1502, 518);
        BFS.General.ThreadWait(500);
        BFS.Input.LeftClickMouse();
        BFS.General.ThreadWait(500);
        BFS.Input.SendKeys("^({VK_65})");
        BFS.General.ThreadWait(500);
        
        // set the "text" variable with the contents of the Clipboard
        text = BFS.Clipboard.CopyText();
        BFS.General.ThreadWait(500);
        
        if (text == "ping")
        {
            BFS.ClipboardFusion.RunMacro("#8 Fra Search: Sett til Pending #OVE 3 days", text, out text);
        }
        else if (text == "B")
        {
            BFS.ClipboardFusion.RunMacro("Macro2", text, out text);
        }
    
        return text;
    }
}</pre><textarea id="code019de5b69fc977898c2f136f0d503133" name="code019de5b69fc977898c2f136f0d503133" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Stringing macros together based on copied text</title>
<link>https://www.clipboardfusion.com/Discussions/View/stringing-macros-together-based-on-copied-text/?ID=9e01dae7-ac03-48dd-809f-4b74bc2302f6#5</link>
<pubDate>Fri, 30 Aug 2019 09:30:09 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/stringing-macros-together-based-on-copied-text/?ID=9e01dae7-ac03-48dd-809f-4b74bc2302f6#5</guid>
<category>ClipboardFusion</category>
<description><![CDATA[I've finaly had time to try and implement this into my workflow, but it's not actually working now.
I've set it up like this.
Code
Copy
Select All
public static class ClipboardFusionHelper
{
public static string ProcessText(string text)
{
// your code goes here
BFS.Input.SetMousePositio...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I've finaly had time to try and implement this into my workflow, but it's not actually working now.<br/>
<br/>
I've set it up 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="#code019de5b69fd37381b3023410929788e6" 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('code019de5b69fd37381b3023410929788e6Js'); 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="code019de5b69fd37381b3023410929788e6Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">public static class ClipboardFusionHelper
{
    public static string ProcessText(string text)
    {
        // your code goes here
    BFS.Input.SetMousePosition(-1502, 518);
    BFS.General.ThreadWait(500);
    BFS.Input.LeftClickMouse();
    BFS.General.ThreadWait(500);
    BFS.Input.SendKeys("^({VK_65})");
    BFS.General.ThreadWait(500);
    BFS.Clipboard.CopyText();
    BFS.General.ThreadWait(500);
        // your code goes here
        if (text == "ping")
        {
            BFS.ClipboardFusion.RunMacro("#8 Fra Search: Sett til Pending #OVE 3 days", text, out text);
        }
        else if (text == "B")
        {
            BFS.ClipboardFusion.RunMacro("Macro2", text, out text);
        }
    
    return text;
    }
}</pre><textarea id="code019de5b69fd37381b3023410929788e6" name="code019de5b69fd37381b3023410929788e6" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
It is able to move the mouse to the correct position, mark the text, and copy  it(i assume), but it's not running the macro, even though the copied text contains "ping"<br/>
It's not doing anything. It just ends without any errors.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Stringing macros together based on copied text</title>
<link>https://www.clipboardfusion.com/Discussions/View/stringing-macros-together-based-on-copied-text/?ID=9e01dae7-ac03-48dd-809f-4b74bc2302f6#4</link>
<pubDate>Wed, 21 Aug 2019 14:40:36 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/stringing-macros-together-based-on-copied-text/?ID=9e01dae7-ac03-48dd-809f-4b74bc2302f6#4</guid>
<category>ClipboardFusion</category>
<description><![CDATA[No worries, glad to hear it!]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
No worries, glad to hear it!
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Stringing macros together based on copied text</title>
<link>https://www.clipboardfusion.com/Discussions/View/stringing-macros-together-based-on-copied-text/?ID=9e01dae7-ac03-48dd-809f-4b74bc2302f6#3</link>
<pubDate>Wed, 21 Aug 2019 05:58:00 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/stringing-macros-together-based-on-copied-text/?ID=9e01dae7-ac03-48dd-809f-4b74bc2302f6#3</guid>
<category>ClipboardFusion</category>
<description><![CDATA[I'm sorry for the late reply. That seems to work perfectly. Thank you very much.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I'm sorry for the late reply. That seems to work perfectly. Thank you very much.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Stringing macros together based on copied text</title>
<link>https://www.clipboardfusion.com/Discussions/View/stringing-macros-together-based-on-copied-text/?ID=9e01dae7-ac03-48dd-809f-4b74bc2302f6#2</link>
<pubDate>Thu, 15 Aug 2019 19:59:14 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/stringing-macros-together-based-on-copied-text/?ID=9e01dae7-ac03-48dd-809f-4b74bc2302f6#2</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Sure! There are a couple of ways you could do this. You could create Trigger rules that look for the specific text and then run the appropriate Macro.
Alternatively, you could do it in a Macro, like this:
Code
Copy
Select All
if (text == "A")
{
BFS.ClipboardFusion.RunMacro("Macro1", text, ...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Sure! There are a couple of ways you could do this. You could create Trigger rules that look for the specific text and then run the appropriate Macro.<br/>
<br/>
Alternatively, you could do it in a Macro, 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="#code019de5b69fe5748eb718389d65aca179" 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('code019de5b69fe5748eb718389d65aca179Js'); 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="code019de5b69fe5748eb718389d65aca179Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">if (text == "A")
        {
            BFS.ClipboardFusion.RunMacro("Macro1", text, out text);
        }
        else if (text == "B")
        {
            BFS.ClipboardFusion.RunMacro("Macro2", text, out text);
        }
        return text;</pre><textarea id="code019de5b69fe5748eb718389d65aca179" name="code019de5b69fe5748eb718389d65aca179" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
<item>
<title>Stringing macros together based on copied text</title>
<link>https://www.clipboardfusion.com/Discussions/View/stringing-macros-together-based-on-copied-text/?ID=9e01dae7-ac03-48dd-809f-4b74bc2302f6</link>
<pubDate>Thu, 15 Aug 2019 09:20:03 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/stringing-macros-together-based-on-copied-text/?ID=9e01dae7-ac03-48dd-809f-4b74bc2302f6</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Hi. I'm looking for a way to make my macros a bit smarter.
I would like to make a macro copy a text from a field in a form (I already have this set up) and use this text to decide what macro to run.
So say I copy text A, the macro will run the next macro named A.
If the text is B, then it will...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Hi. I'm looking for a way to make my macros a bit smarter.<br/>
I would like to make a macro copy a text from a field in a form (I already have this set up) and use this text to decide what macro to run.<br/>
<br/>
So say I copy text A, the macro will run the next macro named A.<br/>
If the text is B, then it will run Macro B, and so on.<br/>
<br/>
Is this possible?
</div>
]]></content:encoded>
</item>
</channel>
</rss>