CL3 clipboard utility (text only) with menu, search, quick paste, cycle/step, plugins, API, ...

Post your working scripts, libraries and tools for AHK v1.1 and older
ahk7
Posts: 591
Joined: 06 Nov 2013, 16:35

Re: CL3 clipboard utility (text only) with menu, search, quick paste, cycle/step, plugins, API, ...

19 Feb 2020, 12:31

@Thoughtfu1Tux if you manage something useful for images you're welcome to post code here or prepare an issue/pull request at GH so I can have a look and if I'd like to incorporate it in CL3 - another wish would be to preserve transparency of images which in the demo code above isn't the case (transparency is "converted" to solid white color which is not what I'd want). Just saying :)
ahk7
Posts: 591
Joined: 06 Nov 2013, 16:35

Re: CL3 clipboard utility (text only) with menu, search, quick paste, cycle/step, plugins, API, ...

01 May 2020, 14:40

v1.97 @ https://github.com/hi5/CL3/

New setting: CopyDelay to set time in milliseconds to wait before adding a copy of a new clipboard entry to the CL3 history.
This may resolve some conflicts when other programs or scripts access the clipboard.
Increasing this value may work around this issue.
The previously hardcoded PasteDelay (50ms) can now also be set.

PrivatePasteRules documentation, adding second OCR TIP
ahk7
Posts: 591
Joined: 06 Nov 2013, 16:35

Re: CL3 clipboard utility (text only) with menu, search, quick paste, cycle/step, plugins, API, ...

04 Sep 2020, 12:16

v1.98 @ https://github.com/hi5/CL3/
  • Fix (attempt) error "This picture is too large and will be truncated" in Excel (Check for CF_METAFILEPICT in clipboard)
  • Modified XA to account for empty XML files due to previous instance of CL3 not being able to save XML data correctly (system crash, forced shutdown, etc) - https://github.com/hi5/CL3/issues/15
ahk7
Posts: 591
Joined: 06 Nov 2013, 16:35

Re: CL3 clipboard utility (text only) with menu, search, quick paste, cycle/step, plugins, API, ...

27 Sep 2020, 04:54

v1.99 @ https://github.com/hi5/CL3/
  • New setting: Exclude programs so copied text will not be added to the clipboard history (useful for password managers for example).
    A "*" is added to the Menu and "Cycle" tooltips for the first entry (a*.) to indicate the current clipboard has different content as to what is shown.
    Selecting 'a*' will still paste the selected text, not the actual current clipboard.
  • New setting: Lineformat (edit control under "Show Lines") \t placeholder for tab to right align, \l placeholder for number of lines.
    Default: \t(\l line),\t(\l lines)
    Comma separated for single and multiple lines.
  • New setting: Show "TrayTip" using OSDTIP_Pop when AutoReplace has been executed on a new clipboard entry.
  • New setting: Auto Backup every X Minutes - automatically backup History. ClipChain, AutoReplace, and Slots only when there is an edit. Keep 5 most recent copies - saved as *.xml.bak in respective ClipData folders.
  • Update XA - https://github.com/hi5/XA
  • Fix ClipChain "Pause" should work correctly now while pressing hotkey (didn't work after v1.95 update of hotkey setup it seems)
ahk7
Posts: 591
Joined: 06 Nov 2013, 16:35

Re: CL3 clipboard utility (text only) with menu, search, quick paste, cycle/step, plugins, API, ...

11 Jun 2021, 05:49

v1.100 @ https://github.com/hi5/CL3/
  • New setting: number of entries in "z. More history" (default 26 for a to z), repeating menu accelerators. Use a negative value e.g. -30 to avoid repeating menu accelerators.
  • New setting: second Show Menu hotkey to be able to define mouse button for example (Winkey+LButton).
  • If there are over 26 templates in a folder, repeating menu accelerators (a-z).
  • New: Check if a sub-folder in \templates\ has a "settings.ini" with a "shortcut" key, if so, setup hotkey to show sub-templates menu directly by passing the main menu, templates, folder navigation.
  • Now using CRC32 to avoid duplicate entries, hopefully faster and more efficient.
  • Fix: Compact(ing) adding lines and crc to compacted history as well.
jwwpua
Posts: 13
Joined: 06 Aug 2021, 15:03

Re: CL3 clipboard utility (text only) with menu, search, quick paste, cycle/step, plugins, API, ...

08 Sep 2021, 22:34

This is great! Is it possible to allow duplicates in the history? I'm copying name, username, email, and password for a list of users. The password is temporary and the same for all of them, so when I use FIFO and start pasting, it skips the password for most of them.

Maybe there's a better way to do this with CL3. I thought clip chain was the right tool, but it's inconvenient to create the chain (manually inserting blank lines) when I'm starting with an excel table or list in a file.

Can I somehow copy multiple cells (or lines in a doc) and paste them all as separate entries in clip chain, rather than as one large entry? Maybe a new option to import from clipboard (as separate entries) which looks for tabs or new lines to split it? Thanks for this tool!
ahk7
Posts: 591
Joined: 06 Nov 2013, 16:35

Re: CL3 clipboard utility (text only) with menu, search, quick paste, cycle/step, plugins, API, ...

09 Sep 2021, 13:40

Some suggestions:

1. To disable checking the history for duplicates comment line https://github.com/hi5/CL3/blob/master/cl3.ahk#L824 (I haven't tested it but it should do the trick)

2. To populate the ClipChain you can try adding the code below to plugins\MyPlugins.ahk - restart cl3, copy data to the clipboard and press the shortcut

Code: Select all

^+#F11:: ; ctrl-shift-winkey-f11  - change it to your liking, probably best to have the clipchain gui hidden
CL3Api_Chain(StrSplit(StrReplace(Clipboard,"`r`n","`n"),"`n")) ; api info https://github.com/hi5/CL3/blob/master/docs/cl3api.md
Return
3. Perhaps also use Slots for items you want to repeatedly pasted https://github.com/hi5/CL3/#slots-plugin-v12 - to quickly add an item to a specific slot you can use #j and then type s1 + enter to store something in slot 1 - see https://github.com/hi5/CL3/blob/master/docs/ccmdr.md - also note Burst which may be useful in combination with Fifo or Paste
jwwpua
Posts: 13
Joined: 06 Aug 2021, 15:03

Re: CL3 clipboard utility (text only) with menu, search, quick paste, cycle/step, plugins, API, ...

12 Sep 2021, 01:54

ahk7 wrote:
09 Sep 2021, 13:40
Some suggestions:

1. To disable checking the history for duplicates comment line https://github.com/hi5/CL3/blob/master/cl3.ahk#L824 (I haven't tested it but it should do the trick)

2. To populate the ClipChain you can try adding the code below to plugins\MyPlugins.ahk - restart cl3, copy data to the clipboard and press the shortcut

Code: Select all

^+#F11:: ; ctrl-shift-winkey-f11  - change it to your liking, probably best to have the clipchain gui hidden
CL3Api_Chain(StrSplit(StrReplace(Clipboard,"`r`n","`n"),"`n")) ; api info https://github.com/hi5/CL3/blob/master/docs/cl3api.md
Return
3. Perhaps also use Slots for items you want to repeatedly pasted https://github.com/hi5/CL3/#slots-plugin-v12 - to quickly add an item to a specific slot you can use #j and then type s1 + enter to store something in slot 1 - see https://github.com/hi5/CL3/blob/master/docs/ccmdr.md - also note Burst which may be useful in combination with Fifo or Paste

Awesome, thanks for the detailed answers. I'm playing around with MyPlugins.ahk based on your suggestion and have it working well now. I'm now using the following:

Code: Select all

#z::
clipboard:=""
send ^c
clipwait
cells := StrReplace(Clipboard,"`r`n","|")
cells := StrReplace(cells,"`t","|")
If (SubStr(cells,0) = "|")
	cells := Substr(cells, 1, StrLen(cells) - 1)
CL3Api_Chain(StrSplit(cells,"|"))
Return
1. select cells in spreadsheet
2. press win+z
3. use clipchain!

Is there a way to have ClipChain send a command after each paste? For instance, have it send {tab} (or maybe even something like {sleep 100}{tab 2} etc.) after each item you paste? I know I can use FIFO via #j and send TAB or ENTER, but this would be really nice with ClipChain if possible. Thanks again!
jwwpua
Posts: 13
Joined: 06 Aug 2021, 15:03

Re: CL3 clipboard utility (text only) with menu, search, quick paste, cycle/step, plugins, API, ...

12 Sep 2021, 02:51

@ahk7 One other question. Is there a way to perform a command before CL3 copies or modifies the current clipboard? I'd like to "send ^+[" (disable my clipboard manager) beforehand, and then "send ^+]" (enable my clipboard manager) after Cl3 performs its function (which I think I can accomplish using the PastePrivateRules.ahk file).

Just fyi, I'm using CopyQ. It has a blacklist feature, but it's based on active window name which doesn't help when AHK is using the Clipboard function or sending ctrl+c in other windows. I need CopyQ to stop interfering with Cl3, especially during FIFO and ClipChain. Still looking at ways to do this from the CopyQ side, but no luck so far. I played with the Clipboard delay settings in CL3, but I'm still getting inconsistent results. For now, I'm trying to remember to manually disable/enable CopyQ.
ahk7
Posts: 591
Joined: 06 Nov 2013, 16:35

Re: CL3 clipboard utility (text only) with menu, search, quick paste, cycle/step, plugins, API, ...

12 Sep 2021, 09:13

My guess is that you would have to add such commands before you change the clipboard in ClipChain and FIFO around here (and sending additional keys after the pasteit() call):

ClipChain
https://github.com/hi5/CL3/blob/master/plugins/ClipChain.ahk#L132

FIFO
https://github.com/hi5/CL3/blob/master/plugins/Fifo.ahk#L48
https://github.com/hi5/CL3/blob/master/plugins/Fifo.ahk#L54
badmojo
Posts: 7
Joined: 08 Jul 2014, 01:24

Re: CL3 clipboard utility (text only) with menu, search, quick paste, cycle/step, plugins, API, ...

15 Dec 2021, 20:38

Hello,

Is it possible to build a history menu containing only URLs?

Thank you for this efficient script!
ahk7
Posts: 591
Joined: 06 Nov 2013, 16:35

Re: CL3 clipboard utility (text only) with menu, search, quick paste, cycle/step, plugins, API, ...

19 Dec 2021, 03:59

Probably something along these lines, at https://github.com/hi5/CL3/blob/master/cl3.ahk#L815 insert the following code. I use a simple regex here to check if the clipboard contents starts with http or www and if it doesn't, don't add it to the history - depending on your needs you should adopt the regex of course.

Code: Select all

; https://github.com/hi5/CL3/blob/master/cl3.ahk#L815
If !RegExMatch(Clipboard,"i)^(http|www)")
	{
	 ClipText:=""
	 Return
	}
badmojo
Posts: 7
Joined: 08 Jul 2014, 01:24

Re: CL3 clipboard utility (text only) with menu, search, quick paste, cycle/step, plugins, API, ...

19 Dec 2021, 21:09

@ahk7: Thanks for the reply, I will make the changes as per your suggestion. :) :thumbup:
ahk7
Posts: 591
Joined: 06 Nov 2013, 16:35

Re: CL3 clipboard utility (text only) with menu, search, quick paste, cycle/step, plugins, API, ...

27 Sep 2022, 07:02

v1.101 @ https://github.com/hi5/CL3
  • New setting: Allow Duplicates, do not automatically delete identical entries.
  • New ClipChain option: enter (multiple) delimiter(s) to split elements from clipboard.
  • New ClipChain option: define send key(s) after paste (AutoHotkey notation) e.g. {tab}.
  • New ClipChain option: define Trim options
  • New Named Slots, setup via ccmdr (sNAME) e.g. store current clipboard content as "name". Access via QuickSlotsMenu setting and Slots menu (if any named slots are created)
  • New Slots setting for QuickSlotsMenu, show all Slots (0-9) and named Slots
  • New API: ChainClear (Clear ClipChain), SlotPaste (paste specific slot ID)
  • New (expert) setting: define the `ClipData` and `Templates` Folders to separate the script from the user history, plugin, and template data (cloud, network, or other drive; appdata etc.)
  • New (Experimental, hidden): HistoryRules (https://github.com/hi5/CL3/blob/master/docs/HistoryRules.md) to allow CL3 to filter clipboard content before adding it to history, allowing or skipping text. @badmojo
yasin7070
Posts: 17
Joined: 10 Feb 2022, 12:06

Re: CL3 clipboard utility (text only) with menu, search, quick paste, cycle/step, plugins, API, ...

28 Oct 2022, 03:56

@ahk7
Sir I have used the AHK version of the tool and it's working fine while exe version is still very old and not working properly

The tool is my choice of using now but there is one problem needed to be fixed

I have retain the history to only slots (max history: 6; menu width: 1; more history: 0). but the CL3 history still goes up to "Z" I wanted it to start from beginning when it is reached 6 "G".
ahk7
Posts: 591
Joined: 06 Nov 2013, 16:35

Re: CL3 clipboard utility (text only) with menu, search, quick paste, cycle/step, plugins, API, ...

29 Oct 2022, 05:01

v1.103 @ https://github.com/hi5/CL3/
  • Change: Limit Cycle through clipboard history to MaxHistory (useful for smaller values)
  • Change: Cycle back/forward through clipboard history now returns to start or end of the MaxHistory value (a->b->c->a)
  • New: Settings to show/hide CL3s "set" menu options "Special, Templates, Yank, More history, and Exit" (see settings menu: Setup menu)
ahk7
Posts: 591
Joined: 06 Nov 2013, 16:35

Re: CL3 clipboard utility (text only) with menu, search, quick paste, cycle/step, plugins, API, ...

04 Dec 2022, 10:35

v1.104 @ https://github.com/hi5/CL3

* New: ccmdr - Burst, adding \s for space
* Fix: check for duplicates didn't work correctly, now it should
* Fix: ClipChain plugin - fix cancelled "Load from Clipboard (Set Delim)"
* New: basic check for update tray menu option for compiled scripts; Prepare code for compiling FileInstall the icons, exclude "private*-includes"

v1.105 @ https://github.com/hi5/CL3

* Fix: adding missing ico to FileInstall for compiled scripts

v1.106 @ https://github.com/hi5/CL3

More fixes related to compiling.
ahk7
Posts: 591
Joined: 06 Nov 2013, 16:35

Re: CL3 clipboard utility (text only) with menu, search, quick paste, cycle/step, plugins, API, ...

19 May 2023, 16:06

v1.107 @ https://github.com/hi5/CL3
  • New: Option to show timestamp in clipboard history menu - https://github.com/hi5/CL3/issues/23
    See https://www.autohotkey.com/docs/v1/lib/FormatTime.htm#Time_Formats for options (e.g. HH:mm (24hr) or hh:mm tt (12hr AM/PM))
  • Fix: Open Template folder - now use commander_path env. variable/registry combined with WinGet ProcessPath/ProcessName, so it should now work with running 32/64 versions. Starts 32bit by default if TC is not running but can be detected.
  • Fix: Use MenuWidth setting in DispMenuText() function to check length instead of previously hardcoded value of 60
ahk7
Posts: 591
Joined: 06 Nov 2013, 16:35

Re: CL3 clipboard utility (text only) with menu, search, quick paste, cycle/step, plugins, API, ...

03 Sep 2023, 04:18

v1.109 @ https://github.com/hi5/CL3/
  • Fix: AutoReplace was still active when Clipboard History was Paused
  • Fix: remove debug MsgBox in SlotPaste (cl3apiclass.ahk)
v1.108
  • New: also show timestamp in tooltip (cycle forward, backward, plugin) and search.
  • New: also show number of lines in search results (number only)
  • Change: timestamp now has two parts, separated by a pipe character (|)
    first part (before |): either a character, default @, or a number, for example 128336 for Unicode clock character*
    second part (after |): time format options - see v1.107
  • Change: when cycling back past "z" show number in tooltip instead of character that no longer had any relation to "menu order"
* 🕐
ahk7
Posts: 591
Joined: 06 Nov 2013, 16:35

Re: CL3 clipboard utility (text only) with menu, search, quick paste, cycle/step, plugins, API, ...

01 Feb 2024, 17:20

v1.110 - https://github.com/hi5/CL3/
  • Fix: Add minimum (20) and maximum value (100) for MenuWidth setting (safety check) - https://github.com/hi5/CL3/issues/26
  • Change: Search plugin, only search text after [ID] marker (also excludes possible timestamp)
  • New: ClipChain preview of full item on mouseover
  • Removed: Notes plugin/settings (commented code so easy to reactivate for those who need it)

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: No registered users and 123 guests