using System;
public static class ClipboardFusionHelper
{
public static string ProcessText(string text)
{
// Preserve the clipboard before copying the app's selected text
string originalClipboardText = BFS.Clipboard.GetText();
string clipboardText = BFS.Clipboard.CopyText();
BFS.Clipboard.SetText(originalClipboardText);
if(string.IsNullOrEmpty(clipboardText))
return text;
clipboardText = clipboardText.Replace(@"\r", "");
string clipboardQueue = BFS.ScriptSettings.ReadValue("ClipboardQueue1");
if(string.IsNullOrEmpty(clipboardQueue))
clipboardQueue = clipboardText;
else
clipboardQueue += clipboardText;
// BFS.Dialog.ShowMessageInfo(">>>" + clipboardQueue + "<<<");
if(clipboardQueue.Length > 0)
BFS.ScriptSettings.WriteValue("ClipboardQueue1", clipboardQueue);
return text;
}
}