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

Window-specific menus

Started by rjbull, October 21, 2026, 06:43:44 AM

Previous topic - Next topic

rjbull

Would it be useful to have window-specific menus?

The idea is that if I'm editing a particular file with a particular editor, say, Toolbox would pop up a menu of actions specific to that situation, e.g., boilerplate texts.  Or if I was using the database, it would pop up a menu of macros to export data in a given format.  As an alternative to popping-up willy-nilly whenever a chosen window appeared, perhaps there could be a universal hotkey to summon the correct menu for that window. That way, you wouldn't have to remember an endless series of hotkeys.

I realise that there can be difficulties distinguishing parent from child windows, but I wasn't too bothered when using similar system in the past.

oblivion

So do you mean a kind of way of enabling a bunch of text expansions or hotkeys that are only applicable when a specific application has focus?

I think, if you wanted (say) alt+F6 to behave differently depending on which application had focus, you could certainly write that into the action code, using something like

Action: Continue if "{notepad.exe}=1"
Not that it's quite the same thing, but I have a fairly complex text expansion that (without going into details) runs a process that gets the next number from the end of a bunch of saved files, increments that number and then types the filename with the incremented number suffixed to it. In principle, it'd be possible to ensure that it only did anything at all if the application that's saving the file was running; and equally, it could be coded to work differently if a different application had focus.

But I suspect if you wanted to have a set of application-specific text expansions enabled or disabled depending on whether a specific application had focus, that might be a challenge. Maybe Paul might think about making it possible for an entire action group to be associated with one or more applications and unavailable otherwise, but that feels like it might be asking quite a lot, particularly as you'd probably want the option to reuse hotkeys between different applications.

Paul (Lead Developer)

Looking into it. :) Pretty sure I can do what rjbull is asking.