Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

User Image
Pablo Olmos de Aguilera Corradini
1 discussion post
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

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;

    }
}


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 :(
May 7, 2018  • #1
Thomas Malloch (BFS)'s profile on WallpaperFusion.com
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

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;
    }
}
May 9, 2018  • #2
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(1)  Login to Vote(-)