Login / Register
▼
Binary Fortress
Binary Fortress Software
CheckCentral
ClipboardFusion
CloudShow
DisplayFusion
FileSeek
HashTools
LogFusion
Notepad Replacer
Online Base64 Decoder
Online Base64 Encoder
Online JSON Formatter
ShellSend
TrayStatus
VoiceBot
WallpaperFusion
Window Inspector
More Apps...
DisplayFusion
CheckCentral
CloudShow
ClipboardFusion
FileSeek
VoiceBot
WallpaperFusion
▼
Download
Download
Change Log
Download Beta
Beta Change Log
License (EULA)
▼
Features
Features
HotKeys
Macros
Triggers
Clipboard Syncing
Clipboard Manager
Languages
Free vs Pro
Purchase
Screenshots
Apps
▼
Online
Online
Recent Items
Pinned Items
▼
Help
Help Guide
FAQ
Discussions
Contact Us
Find My License
Mailing Address
Advanced Settings
Macros
Languages
Clipboard
Fusion
WARNING: You currently have Javascript disabled!
This website will not function correctly without Javascript enabled.
Title
Message
OK
Confirm
Yes
No
Show History Drop-Down List, Modify and Paste Selected Item
Return to ClipboardFusion Macros
Description
This Macro will show a drop-down list that contains the items in the ClipboardFusion History. After choosing an item from the list and clicking OK, the item is manipulated (in this example, it's wrapped in tags for pasting URLs into HTML code), and then pasted into the last active textbox.
Language
C# (.Net)
Minimum Version
3.3+
Created By
Jon Tackabury (BFS)
Contributors
-
Date Created
Dec 19, 2014
Date Last Modified
Dec 19, 2014
Macro Code
Copy
Select All
Toggle Line Wrapping
using System; using System.Collections.Generic; public static class ClipboardFusionHelper { public static string ProcessText(string text) { // get the number of items in the history int count = BFS.ClipboardFusion.GetHistoryItemCount(); if (count <= 0) { // show an error and return if there are no items BFS.Dialog.ShowMessageError("Sorry, there are no items currently in your History."); return ""; } // build the history selection dialog by getting each item in the history List<string> items = new List<string>(); for (int a=0; a<count; a++) items.Add(BFS.ClipboardFusion.GetHistoryText(a)); // show the history selection dialog text = BFS.Dialog.GetUserInputList("Select a History Item", items.ToArray()); // if the user cancels, return without doing anything if (text.Length == 0) return ""; // generate the return text using the value the user selected (in this case it's an HTML link) text = "<a href=\"" + text + "\" target=\"_blank\"><b>XXXX</b></a>"; // paste the generated text into the currently active window BFS.Clipboard.PasteText(text); return text; } }
Copyright © 2007-2021 Binary Fortress Software
•
News
•
Discussions
•
FAQ
•
Support
•
Privacy
•
ToS
•
Get Binary Fortress Merch