<?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: Paste newest item and remove it from the history</title>
<atom:link href="https://www.clipboardfusion.com/Discussions/RSS/?TopicID=c53544f2-3031-4bd5-8246-6720f3678449" rel="self" type="application/rss+xml" />
<link>https://www.clipboardfusion.com/Discussions/RSS/?TopicID=c53544f2-3031-4bd5-8246-6720f3678449</link>
<description>ClipboardFusion RSS: Paste newest item and remove it from the history</description>
<lastBuildDate>Tue, 09 Jun 2026 22:15:23 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.clipboardfusion.com/Discussions/RSS/?TopicID=c53544f2-3031-4bd5-8246-6720f3678449</generator>
<item>
<title>RE: Paste newest item and remove it from the history</title>
<link>https://www.clipboardfusion.com/Discussions/View/paste-newest-item-and-remove-it-from-the-history/?ID=c53544f2-3031-4bd5-8246-6720f3678449#2</link>
<pubDate>Wed, 09 May 2018 13:04:49 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/paste-newest-item-and-remove-it-from-the-history/?ID=c53544f2-3031-4bd5-8246-6720f3678449#2</guid>
<category>ClipboardFusion</category>
<description><![CDATA[I think I see your problem! When you return "text" and not "null", ClipboardFusion will automatically set the clipboard with the result of the Macro. Here's some code that should work for you:
Code
Copy
Select All
public static class ClipboardFusionHelper
{
public static string ProcessText(...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I think I see your problem! When you return "text" and not "null", ClipboardFusion will automatically set the clipboard with the result of the Macro. Here's some code that should work for you:<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="#code019eae74629b763ea8241f58e78b1212" 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('code019eae74629b763ea8241f58e78b1212Js'); 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="code019eae74629b763ea8241f58e78b1212Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">public static class ClipboardFusionHelper
{
    public static string ProcessText(string text)
    {
        // paste the newest entry
        text = BFS.ClipboardFusion.GetHistoryText(0);
        BFS.Clipboard.PasteText(text);
                
        // now remove it
        BFS.ClipboardFusion.RemoveHistoryItem(0);

        //get ClipboardFusion to ignore the result of this macro
        return null;
    }
}</pre><textarea id="code019eae74629b763ea8241f58e78b1212" name="code019eae74629b763ea8241f58e78b1212" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
<item>
<title>Paste newest item and remove it from the history</title>
<link>https://www.clipboardfusion.com/Discussions/View/paste-newest-item-and-remove-it-from-the-history/?ID=c53544f2-3031-4bd5-8246-6720f3678449</link>
<pubDate>Mon, 07 May 2018 19:09:57 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/paste-newest-item-and-remove-it-from-the-history/?ID=c53544f2-3031-4bd5-8246-6720f3678449</guid>
<category>ClipboardFusion</category>
<description><![CDATA[That's it... I'm trying to make a macro to "cycle", paste the item, then remove it, then using the same macro should paste the "next" item.
I've tried this:
using System;
Code
Copy
Select All
public static class ClipboardFusionHelper
{
public static string ProcessText(string text)
{
// ...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
That's it... I'm trying to make a macro to "cycle", paste the item, then remove it, then using the same macro should paste the "next" item.<br/>
<br/>
I've tried this:<br/>
<br/>
using System;<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="#code019eae7462a474e193ce309222ac104a" 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('code019eae7462a474e193ce309222ac104aJs'); 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="code019eae7462a474e193ce309222ac104aJs" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">public static class ClipboardFusionHelper
{
    public static string ProcessText(string text)
    {
        // paste the newest entry
        text = BFS.ClipboardFusion.GetHistoryText(0);
        BFS.Clipboard.PasteText(text);
                
        // now remove it
        BFS.ClipboardFusion.RemoveHistoryItem(0);

        return text;

    }
}</pre><textarea id="code019eae7462a474e193ce309222ac104a" name="code019eae7462a474e193ce309222ac104a" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
But it doesn't seem to remove it from the history. If I change the index, it works (removing the second item), so I don't understand <img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/face-frown.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>
</channel>
</rss>