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?

Confirm

Are you sure?

Clipboard Queue: Paste and Clear

Description
Implements the paste and clear functionality of what I'm calling a clipboard queue. Every add operation copy the current clipboard text to the queue while every paste pastes everything in the queue and clears the queue.
So if you copy 3 times with: "123" then "456" then "abc" and then paste, you'd get "123456abc" pasted
Language
C#.net
Minimum Version
Created By
William Rawls
Contributors
-
Date Created
Aug 24, 2021
Date Last Modified
Aug 24, 2021

Macro Code

using System;

public static class ClipboardFusionHelper
{
	public static string ProcessText(string text)
	{
        string clipboardQueue = BFS.ScriptSettings.ReadValue("ClipboardQueue1");
        
        if(!string.IsNullOrEmpty(clipboardQueue))
        {
            BFS.Clipboard.PasteText(clipboardQueue);
            BFS.ScriptSettings.WriteValue("ClipboardQueue1", "");
        }
        else
        {
            BFS.Dialog.ShowMessageInfo("Nothing to paste");
        }
		return text;
	}
}