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) { int localPinnedItemCount = BFS.ClipboardFusion.GetLocalPinnedItemCount(); if (localPinnedItemCount < 10) { for (int i = localPinnedItemCount; i < 10; i++) { BFS.ClipboardFusion.AddLocalPinnedText("--placeholder--"); } } BFS.ClipboardFusion.SetLocalPinnedText(0, BFS.Clipboard.CopyText()); return null; } }
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) { int localPinnedItemCount = BFS.ClipboardFusion.GetLocalPinnedItemCount(); if (localPinnedItemCount < 10) { for (int i = localPinnedItemCount; i < 10; i++) { BFS.ClipboardFusion.AddLocalPinnedText("--placeholder--"); } } BFS.ClipboardFusion.RunMacro("Convert Text to Title Case (Smart)", text, out string output); BFS.ClipboardFusion.SetLocalPinnedText(0, output); return null; } }
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) { int localPinnedItemCount = BFS.ClipboardFusion.GetLocalPinnedItemCount(); if (localPinnedItemCount < 10) { for (int i = localPinnedItemCount; i < 10; i++) { BFS.ClipboardFusion.AddLocalPinnedText("--placeholder--"); } } BFS.ClipboardFusion.SetLocalPinnedText(1, BFS.Clipboard.CopyText()); Regex regex = new Regex(@" {2,}"); return regex.Replace(output, " ").Trim(); return null; } }
using System; using System.Collections.Generic; using System.Text.RegularExpressions; // 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) { int localPinnedItemCount = BFS.ClipboardFusion.GetLocalPinnedItemCount(); if (localPinnedItemCount < 10) { for (int i = localPinnedItemCount; i < 10; i++) { BFS.ClipboardFusion.AddLocalPinnedText("--placeholder--"); } } BFS.ClipboardFusion.RunMacro("Convert Text to Title Case (Smart)", text, out string output); Regex regex = new Regex(@" {2,}"); return regex.Replace(output, " ").Trim(); BFS.ClipboardFusion.SetLocalPinnedText(0, output); return null; } }
using System; using System.Collections.Generic; using System.Text.RegularExpressions; // 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) { int localPinnedItemCount = BFS.ClipboardFusion.GetLocalPinnedItemCount(); if (localPinnedItemCount < 10) { for (int i = localPinnedItemCount; i < 10; i++) { BFS.ClipboardFusion.AddLocalPinnedText("--placeholder--"); } } BFS.ClipboardFusion.RunMacro("Convert Text to Title Case (Smart)", text, out string output); BFS.ClipboardFusion.RunMacro("Remove Extra White Spaces and Trim", output, out string output2); BFS.ClipboardFusion.SetLocalPinnedText(0, output2); return null; } }
using System; using System.Collections.Generic; using System.Text.RegularExpressions; // 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) { int localPinnedItemCount = BFS.ClipboardFusion.GetLocalPinnedItemCount(); if (localPinnedItemCount < 10) { for (int i = localPinnedItemCount; i < 10; i++) { BFS.ClipboardFusion.AddLocalPinnedText("--placeholder--"); } } BFS.ClipboardFusion.RunMacro("Remove Extra White Spaces and Trim", text, out string output); BFS.ClipboardFusion.SetLocalPinnedText(0, output); return null; } }