<?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: MacroAPI.PasteText(string text) help</title>
<atom:link href="https://www.clipboardfusion.com/Discussions/RSS/?TopicID=88a301b0-8a0c-4d92-84c6-549466ed2c88" rel="self" type="application/rss+xml" />
<link>https://www.clipboardfusion.com/Discussions/RSS/?TopicID=88a301b0-8a0c-4d92-84c6-549466ed2c88</link>
<description>ClipboardFusion RSS: MacroAPI.PasteText(string text) help</description>
<lastBuildDate>Wed, 29 Apr 2026 21:35:09 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.clipboardfusion.com/Discussions/RSS/?TopicID=88a301b0-8a0c-4d92-84c6-549466ed2c88</generator>
<item>
<title>RE: MacroAPI.PasteText(string text) help</title>
<link>https://www.clipboardfusion.com/Discussions/View/macroapipastetextstring-text-help/?ID=88a301b0-8a0c-4d92-84c6-549466ed2c88#8</link>
<pubDate>Wed, 30 Jun 2010 15:16:32 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/macroapipastetextstring-text-help/?ID=88a301b0-8a0c-4d92-84c6-549466ed2c88#8</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Excellent, thanks for following-up.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Excellent, thanks for following-up. <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: MacroAPI.PasteText(string text) help</title>
<link>https://www.clipboardfusion.com/Discussions/View/macroapipastetextstring-text-help/?ID=88a301b0-8a0c-4d92-84c6-549466ed2c88#7</link>
<pubDate>Sun, 27 Jun 2010 06:24:52 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/macroapipastetextstring-text-help/?ID=88a301b0-8a0c-4d92-84c6-549466ed2c88#7</guid>
<category>ClipboardFusion</category>
<description><![CDATA[I have just downloaded v2.0.2.101 Beat 1 and installed it, and tested my simple example macro again.
It works as expected now
I am getting the string "2" pasted to the currently focussed window, and the string "1" left on the clipboard.
Thanks Jon.  I really appreciate that you take the time t...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I have just downloaded v2.0.2.101 Beat 1 and installed it, and tested my simple example macro again.<br/>
<br/>
It works as expected now   <img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/face-grin-beam.light.svg" alt=":-D" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:16px;height:16px;" HelpButtonData=":-D" HelpButtonDataAlign="BelowMiddle" /><br/>
<br/>
I am getting the string "2" pasted to the currently focussed window, and the string "1" left on the clipboard.<br/>
<br/>
Thanks Jon.  I really appreciate that you take the time to investigate and address these issues, bugs and feature requests.   <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: MacroAPI.PasteText(string text) help</title>
<link>https://www.clipboardfusion.com/Discussions/View/macroapipastetextstring-text-help/?ID=88a301b0-8a0c-4d92-84c6-549466ed2c88#6</link>
<pubDate>Sat, 26 Jun 2010 20:53:42 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/macroapipastetextstring-text-help/?ID=88a301b0-8a0c-4d92-84c6-549466ed2c88#6</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Beta 1 is out now, can you give it a try and let me know if it works a bit better for you:
http://www.clipboardfusion.com/Downloads/Windows/
Thanks!]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Beta 1 is out now, can you give it a try and let me know if it works a bit better for you:<br/>
http://www.clipboardfusion.com/Downloads/Windows/<br/>
<br/>
Thanks!
</div>
]]></content:encoded>
</item>
<item>
<title>RE: MacroAPI.PasteText(string text) help</title>
<link>https://www.clipboardfusion.com/Discussions/View/macroapipastetextstring-text-help/?ID=88a301b0-8a0c-4d92-84c6-549466ed2c88#5</link>
<pubDate>Thu, 24 Jun 2010 23:45:01 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/macroapipastetextstring-text-help/?ID=88a301b0-8a0c-4d92-84c6-549466ed2c88#5</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Thanks Jon.
I thought that I was going crazy for a little while there.
Good to know that it was an intermittent issue, and that you are aware of it now.  I look forward to the next release.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Thanks Jon.   <img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/face-grin-beam.light.svg" alt=":-D" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:16px;height:16px;" HelpButtonData=":-D" HelpButtonDataAlign="BelowMiddle" /><br/>
<br/>
I thought that I was going crazy for a little while there.  <img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/face-meh.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/>
Good to know that it was an intermittent issue, and that you are aware of it now.  I look forward to the next release.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: MacroAPI.PasteText(string text) help</title>
<link>https://www.clipboardfusion.com/Discussions/View/macroapipastetextstring-text-help/?ID=88a301b0-8a0c-4d92-84c6-549466ed2c88#4</link>
<pubDate>Thu, 24 Jun 2010 18:41:00 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/macroapipastetextstring-text-help/?ID=88a301b0-8a0c-4d92-84c6-549466ed2c88#4</guid>
<category>ClipboardFusion</category>
<description><![CDATA[I have found a bug related to your example, thanks!  I am pasting the clipboard text but not waiting for it to finish. As a result, sometimes you will get a "1" on the clipboard, sometimes a "2". I have fixed this for the upcoming 2.0.3 release. If you want to get this fix sooner, just enable the...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I have found a bug related to your example, 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" /> I am pasting the clipboard text but not waiting for it to finish. As a result, sometimes you will get a "1" on the clipboard, sometimes a "2". I have fixed this for the upcoming 2.0.3 release. If you want to get this fix sooner, just enable the Beta update checking in the Settings window, as I'll probably put a Beta out next week. 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: MacroAPI.PasteText(string text) help</title>
<link>https://www.clipboardfusion.com/Discussions/View/macroapipastetextstring-text-help/?ID=88a301b0-8a0c-4d92-84c6-549466ed2c88#3</link>
<pubDate>Wed, 23 Jun 2010 10:27:38 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/macroapipastetextstring-text-help/?ID=88a301b0-8a0c-4d92-84c6-549466ed2c88#3</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Thanks for the follow-up Jon.
To give you an idea of why I want to do this...  I was hoping to be able to use the macros as a sort of smart snippet library, so when I press the HotKey for a given macro, the current clipboard value is temporarily saved, then a different string is created and past...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Thanks for the follow-up Jon.<br/>
<br/>
To give you an idea of why I want to do this...  I was hoping to be able to use the macros as a sort of smart snippet library, so when I press the HotKey for a given macro, the current clipboard value is temporarily saved, then a different string is created and pasted to the currently focused window, then the temporarily saved original string is put back on the clipboard.  I do a lot of HTML editing in Notepad (sometimes nothing else is installed on the PCs that I use), and it would be good to be able to insert HTML snippets, so if I copy a string like "head" to the clipboard and run a macro, it will paste a framework of all the HTML elements that I need in the head of a document (head, title, meta, style, etc), then put the original string "head" back on the clipboard.<br/>
<br/>
From what I understand of what you are saying, my example macro should be doing to following:<br/>
[list type=decimal]<br/>
<li>I press (and hold) the HotKey (eg. Ctrl + Alt + Q)</li>
<li>Nothing happens until I release the keys</li>
<li>I release the HotKeys</li>
<li>The macro starts</li>
<li>The 'text' value is set to "1" (in this example macro) - effectively ignoring whatever was on the clipboard before I started the macro</li>
<li>The MacroAPI.PasteText function is called</li>
<li>The string "2" (in this example macro) is pasted to the currently focused window</li>
<li>The string "2" (in this example macro) is saved to the clipboard</li>
<li>The ProcessText function returns the value of 'text' (which, in this example macro, should return "1")</li>
<li>The return value of the ProcessText function is saved to the clipboard (which, in this example macro, should be "1")</li>
[/ul]<br/>
So at the end of this, the macro should have pasted the string "2" to the currently focused window, and then the string "1" should be saved to to the clipboard.<br/>
<br/>
If I used the standard paste command after this, it should just paste whatever is left on the clipboard after running the macro (in this example, it should be "1").<br/>
<br/>
But, what is happening is that the string "1" (not "2") is being pasted to the focused window, and the same string "1" is being saved to the clipboard.  So it seems to be ignoring whatever string I pass to the MacroAPI.PasteText function.<br/>
<br/>
Or am I missing something here...?   <img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/face-grimace.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/>
I'm just trying to get my head around this...  thanks for any further insight that you can give me.<br/>
<br/>
Cheers,<br/>
 - Stephan
</div>
]]></content:encoded>
</item>
<item>
<title>RE: MacroAPI.PasteText(string text) help</title>
<link>https://www.clipboardfusion.com/Discussions/View/macroapipastetextstring-text-help/?ID=88a301b0-8a0c-4d92-84c6-549466ed2c88#2</link>
<pubDate>Tue, 22 Jun 2010 13:48:01 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/macroapipastetextstring-text-help/?ID=88a301b0-8a0c-4d92-84c6-549466ed2c88#2</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Your Macro appears to work as I expect it to, perhaps I need to explain a bit better.  The MacroAPI.PasteText function takes the given text ("2" in your example) and pastes it into the currently focused window. However, it can't do this until you release the ALT and CTRL keys. So, when you press ...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Your Macro appears to work as I expect it to, perhaps I need to explain a bit better. <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" /> The MacroAPI.PasteText function takes the given text ("2" in your example) and pastes it into the currently focused window. However, it can't do this until you release the ALT and CTRL keys. So, when you press "Alt + Ctrl + Q" (for example) to use your Macro, you need to release the keys before the "2" will be pasted. Then, whatever value you return from this function will be set to the clipboard but not pasted. I would recommend always returning the same value you are manually pasting. Does this help?
</div>
]]></content:encoded>
</item>
<item>
<title>MacroAPI.PasteText(string text) help</title>
<link>https://www.clipboardfusion.com/Discussions/View/macroapipastetextstring-text-help/?ID=88a301b0-8a0c-4d92-84c6-549466ed2c88</link>
<pubDate>Tue, 22 Jun 2010 01:23:18 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/macroapipastetextstring-text-help/?ID=88a301b0-8a0c-4d92-84c6-549466ed2c88</guid>
<category>ClipboardFusion</category>
<description><![CDATA[I'm having trouble understanding how the MacroAPI.PasteText(string text) function works.
I have read the documentation at http://www.clipboardfusion.com/Macros/Function/?ID=356d469c-d2d6-49a7-ad05-930a623223bf, which says: This function sets the Clipboard to the given text, then pastes that text...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I'm having trouble understanding how the MacroAPI.PasteText(string text) function works.<br/>
<br/>
I have read the documentation at <a href="http://www.clipboardfusion.com/Macros/Function/?ID=356d469c-d2d6-49a7-ad05-930a623223bf" target="_blank" rel="nofollow"><b>http://www.clipboardfusion.com/Macros/Function/?ID=356d469c-d2d6-49a7-ad05-930a623223bf</b></a>, which says: This function sets the Clipboard to the given text, then pastes that text into the currently focused window.<br/>
<br/>
I tried creating this Macro:<br/>
[pre]using System;<br/>
<br/>
public static class ClipboardFusionHelper<br/>
{<br/>
public static string ProcessText(string text)<br/>
{<br/>
text = "1";<br/>
MacroAPI.PasteText("2");<br/>
return text;<br/>
}<br/>
}[/pre]<br/>
<br/>
From this, I would expect that the value that is saved to the clipboard and is pasted is "2", but it saves and pastes "1" instead.  It doesn't seem to matter what text I pass into the MacroAPI.PasteText function, it never seems to use this text.<br/>
<br/>
Can you provide some more details on how this MacroAPI.PasteText function is supposed to work, perhaps with some examples?<br/>
<br/>
Thanks<br/>
 - Stephan
</div>
]]></content:encoded>
</item>
</channel>
</rss>