using System; using System.Collections.Generic; // The 'text' parameter will contain the text from the: // - Current Clipboard when run by HotKey // - History Item when run from the History Menu // The returned string will be: // - Placed directly on the Clipboard // - Ignored by ClipboardFusion if it is 'null' public static class ClipboardFusionHelper { public static string ProcessText(string text) { // Tell ClipboardFusion to ignore any changes to the Clipboard. // Depending on your settings, pasting text could modify the history BFS.ClipboardFusion.PauseClipboardListener(); // Get the first item from the Clipboard History text = BFS.ClipboardFusion.GetHistoryText(0); // Paste the text to the active window BFS.Clipboard.PasteText(text); // Press the "Tab" button BFS.Input.SendKeys("{TAB}"); // Get the second item from the Clipboard History text = BFS.ClipboardFusion.GetHistoryText(1); // paste the text to the active window BFS.Clipboard.PasteText(text); // Press the "Tab" button BFS.Input.SendKeys("{TAB}"); // Get the third item from the Clipboard History text = BFS.ClipboardFusion.GetHistoryText(1); // paste the text to the active window BFS.Clipboard.PasteText(text); // Press the "Tab" button BFS.Input.SendKeys("{TAB}"); // Get the fourth item from the Clipboard History text = BFS.ClipboardFusion.GetHistoryText(1); // paste the text to the active window BFS.Clipboard.PasteText(text); // Press the "Tab" button BFS.Input.SendKeys("{TAB}"); // Tell ClipboardFusion to start watching the Clipboard again BFS.ClipboardFusion.ResumeClipboardListener(); // Tell ClipboardFusion to ignore the return from this Macro return null; } }