News:

Welcome to our NEW forum! We invite you to sign up today
so it can grow to be a valuable resource to all Toolbox users!

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - oblivion

#1
One of the first things I did with my shiny new copy of Toolbox was write myself a menu system.

Particularly as the Windows Start menu has lost a lot of the structural features it had back in the day. I can't help it, I want to organise things.

So there's a command that makes doing this sort of thing straightforward, but if you're planning on a big structure, life gets a bit... tedious.

So this is a tutorial on an easy way to make yourself something useful.

Prerequisite: you need to know at least a little about where programs live on your computer. Beyond that, I'll try to hold your hand a little.

Optional extra, but I rely on this a lot. Make yourself 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 Alert: Ask for a file as "exe,com,cmd"
0002 String: Assign "alert$"
0003 String: Replace regex text "$3,dos:$1$3$4,icon=$1$3$4 from ^(.*[\\/])(["']?)([^\\/]+?)(\.[^\\.¬
]+)?\2$"
0004 String: Replace text ""="
0005 Clipboard: Assign text "string$"
0006 Keyboard: Paste ""
(End)

I have this on Alt-Win-P but do whatever's comfortable.

What it does, is lets you navigate to a program on your computer (line 0001) and make a valid menu entry from it. I'll talk more about this shortly.

Now for the menu. Make yourself a new action, call it something meaningful (mine's called Universal Mouse Menu) and start it 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 Mouse: Move to desktop position "numpad5"
0002 Alert: Show a mouse menu "[[Mouse Menu]]"
(End)

Line 0001 just puts the mouse in the centre of the screen. Line 0002 is where we're going to spend the rest of our time.

The important thing to know here is in the help text for the "Alert: Show a mouse menu" command. I'll quote it:

QuoteSpecify each menu item on its own single line. Lines surrounded in double brackets [[Like This]] are disabled and intended for use as menu headings. Lines surrounded in single brackets [Like This] start a new sub-menu, and they're closed with a single line of <. A line of a single dash (-) puts a bar in the menu at that place.

So the key takeaways: a new menu heading is surrounded by square brackets, a heading that's just for display is surrounded by double square brackets, and when you hit the bottom of a menu and want to go back a level, it's a left chevron (which looks a bit like an arrow pointing left) on a line on its own.

So right now, all you have is a menu that has a title, currently set to "Mouse Menu." You can change that to anything you like, it's free text.

So let's say that you want your menu to have three main categories -- Office Programs, Utilities and Games. And perhaps some sub-categories of the Games category: Action and Casual.

Looking at the Help, we do this by (first opening line 2 for editing) adding headings, lines for separation, and hierarchical submenus as we wish.

So, just working from the above menu categories, we can update our menu code 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 Mouse: Move to desktop position "numpad5"
0002 Alert: Show a mouse menu "[[Mouse Menu]]~[Office Programs]~<~[Utilities]~<~[Games]~[Action]~<~¬
[Casual]~"
(End)

If you try this just by double-clicking it in the Actions list, you'll see you've already made a menu that you can navigate through, using mouse or keyboard, completely as you'd expect.

No usable contents yet, though.

One nice thing about this is that you can decide on the structure you want, then just add appropriate entries in the category you want. And you can define categories that suit you, fit to the way you think and work.

An entry for a program you might want to run will look a bit like this:

Program name to be displayed,dos:program to run,icon=filename of icon file

That can get tedious quickly, particularly if your menu is going to contain a lot of programs. You don't necessarily need the full path to the program if it's on the path that Windows knows to look through, but it's safest if it's included. Which potentially means you need it twice: once for the program to run bit, and again for the icon.

Remember the complicated-looking action I gave you at the top of this post? What it does is opens a file navigator for you to find and choose a program you want to make a menu entry for.

Once you've picked your program, line 3 of the code dismantles the filename into separate (and reusable) bits, then makes a menu line for you, following the above structure, then pastes it to the current cursor position.

All you have to do -- and even that might not always be necessary -- is replace the program name at the beginning of the line with something of your choice that describes what it does.

For example, let's say you want to put Windows Notepad into a new entry in your Utilities section.

First, open the "Alert: Show a mouse menu" command by double-clicking on line 0002 in the action.

Next, put the cursor at the end of the line that says [Utilities] and press the Enter key to open up a new line in the Utilities section.

Next, press the Alt-Win-P shortcut (or whichever key combo you chose to trigger the first action above) and navigate to c:\windows (or wherever your Windows folder lives), click on notepad.exe and click the Open button.

This line magically appears:

notepad,dos:C:\Windows\notepad.exe,icon=C:\Windows\notepad.exe
The bit before the first comma is the filename without its extension. It's free text, so there's nothing to stop you changing the line to

Windows default plain text editor,dos:C:\Windows\notepad.exe,icon=C:\Windows\notepad.exe
So now, the whole action looks 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 Mouse: Move to desktop position "numpad5"
0002 Alert: Show a mouse menu "[[Mouse Menu]]~[Office Programs]~<~[Utilities]~Windows default plain¬
 text editor,dos:C:\Windows\notepad.exe,icon=C:\Windows\notepad.exe~<~[Games]~[Action]~<~[Casual]~"
(End)

Rinse, as they say, and repeat. You can make these fairly big: my normal mouse menu has around 100 entries, all separated out into functional or themed groups. One, for instance, is a group called "Morning"" which just has a handful of programs that I almost always run first thing. In those cases, those programs also have entries in functional groups elsewhere in the menu system -- so yes, there's some duplication, and yes, it's on purpose.

You should set the trigger for the action to something you can remember and is easy for your fingers to find. I use Control+Windows+U as, in my head, this is a Universal menu but you can and should absolutely do what works for you.

Finally, Line 0003 of the Alt-Win-P action at the top of this is an example of using a Regular Expression (RegEx) for search and replace. Paul and I worked together to make it work, as neither of us are RegEx experts, and if you need to mess with it, or understand better how it works, you should look for RegEx tutorials online. In my case, I find it difficult to keep in my head once I've solved a problem, I usually have to relearn it, almost from scratch, next time I need it, so please don't ask me about it! Anything else here, though, I'm happy to expand on. :)
#2
I'm running out of superlatives. Will "Awesome!" do? :D
#3
Feature Requests / Re: Recursion?
June 16, 2026, 09:39:05 PM
Perfect! Thanks! :)
#4
Feature Requests / Recursion?
June 16, 2026, 02:19:00 AM
So I was working on something today. Playing with Notes, in fact. Creating myself a set of notes.

And it's all being copy/pasted from somewhere else, with a bit of editing for tidiness and consistency, nothing terribly clever.

And, at some point, without really thinking, I invoked my Clipboard History action, documented elsewhere, to fetch something out of the clipboard that wasn't the current content... and of course the process of selecting the element I wanted, from the programmatically invoked Clipboard tab, also closed the Notes tab.

Normally, of course, this doesn't happen -- the Window: Assign Active command ensures that although the Toolbox's Clipboard tab has been invoked, the pasted text goes where it's been invoked from.

But when it was invoked from somewhere else inside Toolbox...

So I think I'd like to be able to check if I'm moving information around Toolbox instead of outside it, and where I was so I can get back there again. I don't think there's a function that'll let me do that -- or is there?

So I think I want to be able to go, in pseudocode:

if activewindow is toolbox
 get current tab
 invoke clipboard search / navigation code and get selection
 return to previously selected tab
 paste
else
 invoke clipboard search / navigation code and get selection
 return to active window
 paste


I think most of what's needed may already exist, but I don't think I can detect the currently open/active tab -- can I?


#5
General Discussion / Re: Notes
June 15, 2026, 11:20:29 PM
Cool, thanks!  8)  I'll definitely be able to make use of that :)


#6
General Discussion / Notes
June 15, 2026, 04:27:42 AM
It occurred to me to wonder if I was missing anything useful with the Notes tab.

It doesn't even get a mention on the front page of the website.

I know there are notes-keeping programs out there, featuring probably far more functionality than Toolbox is likely to want to provide, but it surely has its place in the pantheon of Useful Things Toolbox can do...?

So... let's say I wanted to use Notes to keep -- say -- a reference of software licenses in. Nothing clever, plaintext copied out of emails, some easy search facilities. Would that be a good use of it? Might it be worth a few lines on the main webpage?
#7
Quote from: oblivion on June 05, 2026, 03:36:06 AMFair enough. :)

However, I do wonder if a command to create / edit a note from an action might be a useful thing?
Just to make that perhaps a bit better expressed: one of my gadgets is a notes program called Cintanote. Something it can do, which often comes in useful, is I can highlight some text somewhere, hit a hotkey, and Cintanotes will create a new note with the selected text as the content. So it's that sort of functionality I'm thinking of here.
#8
Fair enough. :)

However, I do wonder if a command to create / edit a note from an action might be a useful thing?
#9
Can I make a suggestion?

How about a (hopefully simple) right-click function that could take the currently selected action and copy it to a Note, with the action name as the first line of the note and a the hotkey as the second? Oh, maybe some element that could be used as a search criterion so you could find all your backed-up actions easily?
#10
Tips and Tricks / Re: Case modification anywhere
May 31, 2026, 10:13:02 PM
The updated version of the code -- and I've added in the MiXeD cAsE block because removing unwanted blocks is easier than adding them -- is here:

(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 Window: Assign active ""
0002 Wait: For action hotkey to be released ""
0003 Clipboard: Clear all content ""
0004 Keyboard: Copy ""
0005 Action: Abort if no clipboard text ""
0006 String: Assign from clipboard text ""
0007 Alert: Ask for a choice "Case modification type?~iNVERT~lower case~Sentence case~Title Case~AL¬
L CAPS~MiXeD cAsE"
0008 Action: Do next step if "alert$=iNVERT"
0009  String: Case swap ""
0010 Action: Do next step if "alert$=Title Case"
0011  String: Case title ""
0012 Action: Do next step if "alert$=Sentence case"
0013  String: Case sentence ""
0014 Action: Do next step if "alert$=lower case"
0015  String: Case lower ""
0016 Action: Do next step if "alert$=ALL CAPS"
0017  String: Case upper ""
0018 Action: Do next step if "alert$=MiXeD cAsE"
0019  String: Case mixed ""
0020 Clipboard: Assign text "string$"
0021 Keyboard: Paste ""
(End)
#11
Tips and Tricks / Re: Case modification anywhere
May 31, 2026, 10:08:29 PM
Ah. Now that gave me an idea.

Adding

Wait: For action hotkey to be released ""
at step 2 fixed it. :)
#12
General Discussion / Re: Hotkey oddity
May 30, 2026, 10:50:09 PM
If you think I'm going to roll back to 24H2 (I do have a full backup, I could, but argh) you have another think coming. :D

The refresh trigger list: yes, that's a useful thing to know, I'll try to remember that.

By the way, I just spotted the move to numpad# option for windows and mouse movements (in your Toolbox vs Autohotkey comparison post) and yay! Is that newish, or is it just one of the (many!) things in Toolbox I'd failed to notice / register when I was writing things?

At a tangent: the comparison between Autohotkey and Toolbox is interesting and useful. I'd also add that Toolbox scripts mostly don't need to be completely rewritten when there's a Toolbox version change -- I have an extremely complex Autohotkey script at work that operates as an automation robot: takes data from one source and copies it to another, in the absence of a "proper" backend interface. It was written in Autohotkey v1 and fails so hard in Autohotkey v2 it'd make your head spin. :D
#13
Tips and Tricks / Re: Case modification anywhere
May 30, 2026, 12:56:46 AM
The test version has a fair chance of replacing the selected text with C, which is what I was seeing previously too (maybe V depending on what was happening at the time.)

So my macro can't press C without the control key down and doesn't release the control key until C's been pressed, whereas -- presumably -- keyboard: copy works differently?

Oh, one observation: it's a capital C that gets typed, when I use keyboard: copy. Should it be ctrl-c rather than ctrl-C? Or shouldn't that matter?
#14
General Discussion / Hotkey oddity
May 29, 2026, 01:14:04 AM
I finally allowed my laptop to update to Windows 11 25H2 today, on the basis that most of the issues with it are either ironed out or good workarounds exist. In fact, I have so many customisations in place that, at least superficially, I can't see a difference between it and 24H2.

But. I have a tiny action that opens Toolbox at the Automation tab (with ctrl-shift-A as the hotkey) instead of my usual default, for when I'm creating new Actions, and although I'd created a placeholder for my text case action, I hadn't written it yet. 

So, update completed, I hit ctrl-shift-a to open Toolbox Automation and it didn't work.

Oh. The Toolbox icon in the notification area had gone away. Weird. Run Toolbox back up and I went to check that the action wasn't using a hotkey that the updated version of Windows had reserved for something new.

Clicked the "set trigger" button and, sure enough, Toolbox is telling me that that combo isn't available anymore. And although I could set other triggers, I found myself wondering if I'd lost any others.

Quite a few, it turned out.

But then, instead of using the "set trigger" button to set a new trigger, I hit the "delete trigger" button and, having done so, found that I could set a new trigger of ctrl-shift-a without an issue -- in other words, there was an issue with the chosen trigger but deleting it and replacing it with the same trigger put it back how it was.

Is this a real bug? Dunno. Is it Windows' fault? Maybe. But I thought I'd post it here in case it bites anyone else...
#15
Tips and Tricks / Case modification anywhere
May 28, 2026, 09:12:47 PM
If you're anything like me -- half-decent typist but have to look at the keyboard more than a touch typist would -- you might get similar issues to one of my greatest bugbears -- hitting Caps Lock, forgetting it's on and typing a load of text with the case inverted.

lIKE THIS.

Last time I did it, I felt fairly sure that there was an action in Toolbox's default library that could deal with this -- and I couldn't find it. But there are script actions that can handle all that stuff, so I wrote one.

One caveat: it won't work if Toolbox isn't running as Admin -- or it won't for me, anyway.

(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 Window: Assign active ""
0002 Clipboard: Clear all content ""
0003 ;Keyboard: Copy ""
0004 Macro: Type keys or use mouse "{z200}{ctrldown}{z200}c{z200}{ctrlup}{z200}"
0005 Action: Abort if no clipboard text ""
0006 String: Assign from clipboard text ""
0007 Alert: Ask for a choice "Case modification type?~iNVERT~lower case~Sentence case~Title Case~AL¬
L CAPS~"
0008 Action: Do next step if "alert$=iNVERT"
0009   String: Case swap ""
0010 Action: Do next step if "alert$=Title Case"
0011   String: Case title ""
0012 Action: Do next step if "alert$=Sentence case"
0013   String: Case sentence ""
0014 Action: Do next step if "alert$=lower case"
0015   String: Case lower ""
0016 Action: Do next step if "alert$=ALL CAPS"
0017   String: Case upper ""
0018 Clipboard: Assign text "string$"
0019 ;Keyboard: Paste ""
0020 Macro: Type keys or use mouse "{z200}{ctrldown}{z200}v{z200}{ctrlup}{z200}"
(End)

The sharp-eyed will probably wonder why I used a couple of macro steps to replace the commented-out 
Keyboard: Copy 
and 

Keyboard: Paste
commands. I think it's an idiosyncracy of my PC -- they don't work reliably for me, so I've used the macro steps to replicate copy and paste with some fifth-of-a-second delays plugged in, which DOES seem to be solid on my kit. By all means experiment: just use the "right click, toggle disabled step" on steps 3, 4, 19 and 20 to swap the Macro approach with the Keyboard approach to see if it'll work better for you that way. The baked in version is definitely easier to read!

The menu in step 7 can also be modified to present the options in the order you prefer: I have the option I use most at the top, but because of the way the rest of the code works, if you change the order of the options, as long as you don't change the text of the entries, it'll work fine.

The super sharp-eyed among you will wonder why I missed out an option for MiXeD cAsE. Simples: I never use it. If you do, by all means amend line 7 to

[font=Verdana, Arial, Helvetica, sans-serif]0007 Alert: Ask for a choice "Case modification type?~iNVERT~lower case~Sentence case~Title Case~AL¬[/font]
L CAPS~MiXeD cAsE"

and add another action block at line 18 like this:

0018 Action: Do next step if "alert$=MiXeD cAsE"
0019  String: Case mixed ""

And obviously assign the action to a memorable hotkey. 

So the usage is: highlight the text you want to modify, activate the hotkey you've chosen and pick the modification of choice from the popup menu. In my setup, because the Invert option is first, that's the default so all I have to do is press the Enter key if that's what I want.