AlomWare Toolbox Forum

General Category => Feature Requests => Topic started by: oblivion on February 03, 2026, 09:22:00 PM

Title: Clipboard history access
Post by: oblivion on February 03, 2026, 09:22:00 PM
I'm a clipboard history addict. I've used a number of clipboard tools over the years, some better than others, but one thing they all have in common is the ability to summon the clipboard history at a keypress.

I thought I'd be able to make Toolbox do something helpful. I found 

Toolbox: Filter clipboard list with "none"
which I thought might open an unfiltered clipboard history but it looks like it just clears any active clipboard filters without showing any results.

So I'm not entirely sure what to ask for. The easiest route, I think, would be an (automation) ability to open the Toolbox with the clipboard pane active on a keypress -- which probably extends to an ability to open the Toolbox with a specific pane active. Might that be a possibility?

Alternatively, the ability to write a script that could build a menu containing -- say -- the most recent x items from the current clipboard filter might be more adaptable (which is kind of what I'd hoped the Toolbox: Filter clipboard list command might do, all in one!)

Title: Re: Clipboard history access
Post by: Paul (Lead Developer) on February 03, 2026, 10:04:55 PM
You can make Toolbox's window show any tab like this:

(Start)
HOW TO USE: Copy from Start to End, and then paste into an action.
REFERENCE : See an example of pasting at alomware.com/paste.png
0001 Toolbox: Show the tab named "Clipboard"
(End)

And combine with it a filter to show any clips containing specific text like this:

(Start)
HOW TO USE: Copy from Start to End, and then paste into an action.
REFERENCE : See an example of pasting at alomware.com/paste.png
0001 Toolbox: Show the tab named "Clipboard"
0002 Toolbox: Filter clipboard list with "clips with this text"
(End)

Is that what you're after?
Title: Re: Clipboard history access
Post by: oblivion on February 04, 2026, 03:18:56 AM
That might well be exactly what I needed. :)

(Start)
HOW TO USE: Copy from Start to End, and then paste into an action.
REFERENCE : See an example of pasting at alomware.com/paste.png
0001 Alert: Set the default text to "blank$"
0002 Alert: Ask for a line of text "Search clipboard for..."
0003 Action: Do this block if "alert$=blank$"
0004   String: Assign "none"
0005 Action: End of block ""
0006 Action: Do this block if "alert$<>blank$"
0007   String: Assign "alert$"
0008 Action: End of block ""
0009 Toolbox: Filter clipboard list with "string$"
0010 Toolbox: Show the tab named "Clipboard"
0011 Wait: For keypresses or mouse clicks "{esc}"
0012 Wait: For milliseconds to pass "200"
0013 Keyboard: Paste ""
(End)

It's not quite what I want: making sure the clipboard window is closed before continuing took several attempts before I could get it to work and it requires that the user presses Esc rather than closing the window by other means, and I could undoubtedly go back and replace the "do this block if" lines with "do the next line if" lines and I need a way of escaping without committing (like do if clip$<>blank$ at the end, probably) but I'll play with it some more then put it in Tips and tricks... :)

Thanks!


Title: Re: Clipboard history access
Post by: Paul (Lead Developer) on February 04, 2026, 09:31:39 PM
Quote from: oblivion on February 03, 2026, 09:22:00 PMToolbox: Filter clipboard list with "none"
which I thought might open an unfiltered clipboard history but it looks like it just clears any active clipboard filters without showing any results.
Specifying "none" means to use no filter, so it shows all clips in the history as a result. Works as intended like that here.

What is your action trying to do? Looks like filter the list with specific text, but you've got a paste step there at the end without copying anything to the clipboard?
Title: Re: Clipboard history access
Post by: oblivion on February 04, 2026, 11:27:09 PM
The filter does exactly what it's supposed to, I agree. At that stage, I thought it'd open the clipboard history too.

As you'll have gathered, I know better now. :)

The action itself doesn't put anything in the clipboard, it relies on the user selecting something from the clipboard history.

The final version -- well, not final, it's probably not quite all it needs to be -- is in Tips and Tricks.

It's not quite as economical as it might be, I could have managed the flow slightly better, and I haven't solved for a "entry chosen and put on clipboard but toolbox closed with mouse instead of Esc" but I've decided, at least temporarily, that it's a feature not a bug. :D
Title: Re: Clipboard history access
Post by: Paul (Lead Developer) on February 05, 2026, 05:52:29 PM
Ah, I see now about copying from the list. I assumed that after I posted, so the next release has this feature:

QuoteEnhancement: The "Clipboard: Assign text" now supports "{list:#}" as a value, to copy the visible clipboard history list item from that position (# = 1-100 only). For example, specifying "{list:1}" will copy the latest visible clipboard history item back into the clipboard.

For your closing of Toolbox's window, did you know about this step: "Toolbox: Visible", which lets you hide or show it programmatically without needing to send an {Esc} keystroke to it. ;)
Title: Re: Clipboard history access
Post by: oblivion on February 06, 2026, 06:16:48 PM
Quote from: Paul (Lead Developer) on February 05, 2026, 05:52:29 PM
QuoteEnhancement: The "Clipboard: Assign text" now supports "{list:#}" as a value, to copy the visible clipboard history list item from that position (# = 1-100 only). For example, specifying "{list:1}" will copy the latest visible clipboard history item back into the clipboard.

Nice. Now to think about how to offer that as an option without over-complicating the script. I guess if I get a number in the search value, I could offer the last n lines instead of searching for n. Would I ever search for a number? Not often... yes, that might work :)

QuoteFor your closing of Toolbox's window, did you know about this step: "Toolbox: Visible", which lets you hide or show it programmatically without needing to send an {Esc} keystroke to it. ;)

No, missed that. I'll try that instead later on, if I get some time.
Title: Re: Clipboard history access
Post by: oblivion on February 06, 2026, 10:39:39 PM
Quote from: oblivion on February 06, 2026, 06:16:48 PM
Quote from: Paul (Lead Developer) on February 05, 2026, 05:52:29 PMFor your closing of Toolbox's window, did you know about this step: "Toolbox: Visible", which lets you hide or show it programmatically without needing to send an {Esc} keystroke to it. ;)
No, missed that. I'll try that instead later on, if I get some time.
Hold on, that's not going to help. (A bit more awake, now!) The Toolbox clipboard must be closed by the user, not programmatically. So I have to make the action react when the window's closed; I can do that if I look for {esc} but if the window's closed in another way, I'd need to be able to spot that and paste any clipboard contents into the active window.

So I'm using

0001 Wait: For keypresses or mouse clicks "{esc}"

but it'd be better if it could be

Wait: For Toolbox:Visible is False

or something like that. :)
Title: Re: Clipboard history access
Post by: Paul (Lead Developer) on February 06, 2026, 10:47:26 PM
Maybe use the "toolbox$" variable to see if Toolbox's window is visible (will be "1" for yes and "0" for no):

(Start)
HOW TO USE: Copy from Start to End, and then paste into an action.
REFERENCE : See an example of pasting at alomware.com/paste.png
0001 Alert: Show a message "Toolbox's window: toolbox$"
(End)

(https://www.alomware.com/images/forum/toolbox-variable.png)

You can wait for Toolbox's window to close like this:

(Start)
HOW TO USE: Copy from Start to End, and then paste into an action.
REFERENCE : See an example of pasting at alomware.com/paste.png
0001 Wait: For variable to change "toolbox$"
0002 Alert: Show a notification "Toolbox's window has closed!"
(End)
Title: Re: Clipboard history access
Post by: oblivion on February 07, 2026, 02:25:54 AM
That looked sensible, but a straight swap resulted in a bare v appearing. Then the same thing happened when I reverted. So I've swapped out the Paste for a macro command, like this:

(Start)
HOW TO USE: Copy from Start to End, and then paste into an action.
REFERENCE : See an example of pasting at alomware.com/paste.png
0001 Action: Allow failure messages "0"
0002 Window: Assign active ""
0003 Clipboard: Clear all content ""
0004 Alert: Set the default text to "blank$"
0005 Alert: Ask for a line of text "Search clipboard for..."
0006 Action: Do next step if "alert$=blank$"
0007  String: Assign "none"
0008 Action: Do next step if "alert$<>blank$"
0009  String: Assign "alert$"
0010 Toolbox: Filter clipboard list with "string$"
0011 Toolbox: Show the tab named "Clipboard"
0012 Wait: For variable to change "toolbox$"
0013 Wait: For milliseconds to pass "200"
0014 Window: Activate for use ""
0015 Action: Do this block if "clip$<>"""
0016  Macro: Type keys or use mouse "{z200}{ctrldown}{z200}v{z200}{ctrlup}{z200}"
0017 Action: End of block ""
(End)


and that's got it working. You'll see that I've added some Window: Activate commands for a bit of belt-and-braces stuff, and I might have overegged the delays in the Macro: Type keys line but, trust me, it took some playing even to not get a v from line 16 when the {z200} elements weren't there.

I'll put this updated code in Tips & Tricks as it's a bit more robust, but I might hang fire for a while in case I find another way to break it. :D
Title: Re: Clipboard history access
Post by: Paul (Lead Developer) on February 20, 2026, 10:47:07 PM
Quote from: oblivion on February 03, 2026, 09:22:00 PMthe most recent x items from the current clipboard filter might be more adaptable
I overlooked this part of your post. :( You can actually filter any list by using the format /# for the filter, where # is the number of items to show. Use /0 for unlimited items. So to open the clipboard list and show the last 10 clips, you'd use an action like this:

(Start)
HOW TO USE: Copy from Start to End, and then paste into an action.
REFERENCE : See an example of pasting at alomware.com/paste.png
0001 Toolbox: Filter clipboard list with "/10"
0002 Toolbox: Show the tab named "Clipboard"
(End)
Title: Re: Clipboard history access
Post by: GCRedditor136 on February 21, 2026, 11:06:06 AM
Quote from: Paul (Lead Developer) on February 20, 2026, 10:47:07 PMYou can actually filter any list by using the format /# for the filter, where # is the number of items to show
What the heck... you really do think of everything.
Title: Re: Clipboard history access
Post by: oblivion on February 23, 2026, 10:44:00 PM
Quote from: Paul (Lead Developer) on February 20, 2026, 10:47:07 PMYou can actually filter any list by using the format /# for the filter, where # is the number of items to show. Use /0 for unlimited items.

Oh, magic! Thanks, I think I can use that. Hopefully, if a number is the search term I can use /n instead of searching for the text. I shall go and play!