[Feature request] Allow user to allocate hotkeys to context menu items also

Discussion related to "Everything" 1.5.
Post Reply
Raindrops
Posts: 253
Joined: Sat Jan 21, 2023 10:04 am

[Feature request] Allow user to allocate hotkeys to context menu items also

Post by Raindrops »

I have installed the most powerful renamer app (IMHO) called ReNamer.
I have added it to the context menu's Send to option.

I would like to select files/folders in search results and send them to ReNamer directly with a shortcut.
But the Options only provide hotkeys for menu system, not for context menu items.
image.png
image.png (56.52 KiB) Viewed 1151 times
It would be great if we can allocate hotkeys to context menu options.
void
Developer
Posts: 19870
Joined: Fri Oct 16, 2009 11:31 pm

Re: [Feature request] Allow user to allocate hotkeys to context menu items also

Post by void »

All well-defined context menu items can be assigned hotkeys.

To set a hotkey to a custom context menu item, either:

1). Use a custom open command
Set the hotkey to File | Custom Open 1
Set the command under Tools -> Options -> Advanced -> custom_open_command01.
Use %* in your command to execute renamer. (same behavior as the Send to option)



2). Use a custom verb
Set the hotkey to File | Custom Verb 1
Set the verb under Tools -> Options -> Advanced -> custom_verb01
For example:
renamer

Setup your verb and command under regedit -> HKEY_CLASSES_ROOT\*\shell\renamer\command
(The verb here would be renamer).
This option will probably not work as each selected file is called separately.
Raindrops
Posts: 253
Joined: Sat Jan 21, 2023 10:04 am

Re: [Feature request] Allow user to allocate hotkeys to context menu items also

Post by Raindrops »

Thanks for the prompt response!

I set an advanced > custom_open_command_01 as
$exec("C:\Program Files (x86)\Util\ReNamer\ReNamer.exe" "%*")

Then I set its hotkey to 1 (all other hotkeys are already assigned to different functions).
But when I select a few files and then press 1, it launches ReNamer, but without any files loaded in it.

If I use the context menu of the selection and select Send to > ReNamer option, it sends all files to ReNamer correctly.
What could be wrong?

Update 1:
I tried to insert the escape character "$" in the path as follows
$exec("C:\Program Files $(x86$)\Util\ReNamer\ReNamer.exe" "%*")
But the result is still the same.

Update 2:
The command can load the file when I use "%1" as parameter, but it launches a separate instance of ReNamer for each selected file.
But %* does not work at all.
It launches a single instance of ReNamer, but does not load any files in it.
void
Developer
Posts: 19870
Joined: Fri Oct 16, 2009 11:31 pm

Re: [Feature request] Allow user to allocate hotkeys to context menu items also

Post by void »

Please try the following command:

Code: Select all

$exec("C:\Program Files $(x86$)\Util\ReNamer\ReNamer.exe" %*)
That is %* without the quotes.
Each filename is automatically quoted.
"%*"
will work as expected in Everything 1.5.0.1405a or later.
Raindrops
Posts: 253
Joined: Sat Jan 21, 2023 10:04 am

Re: [Feature request] Allow user to allocate hotkeys to context menu items also

Post by Raindrops »

oh!

I am not a coder, so not familiar with coding/scripting syntax.

I removed the quotes around %* and it works fine!
Thanks!
Post Reply