Page 2 of 4

Re: Support for parameters when binding commands to hotkeys

Posted: 2023-05-18, 07:11 UTC
by ghisler(Author)
It's due to the following change:
14.05.23 Added: Internal commands which do not start with cm_ or em_ now support placeholders like %P%N in internal associations and user-defined hotkeys, e.g. OPENBARMENU (32/64)
That's because I'm treating it like the parameters field in configuration - button bar.
So you need to use %|COMMANDER_PATH| instead of %COMMANDER_PATH%.

Re: Support for parameters when binding commands to hotkeys

Posted: 2023-05-18, 07:26 UTC
by Fla$her
ghisler(Author) wrote: 2023-05-18, 07:11 UTC So you need to use %|COMMANDER_PATH| instead of %COMMANDER_PATH%.
I immediately started with %|COMMANDER_PATH|, it doesn't work.

Re: Support for parameters when binding commands to hotkeys

Posted: 2023-05-18, 07:49 UTC
by ghisler(Author)
I have just tried it here and it worked just fine. Maybe you forgot the backslash behind it?

Re: Support for parameters when binding commands to hotkeys

Posted: 2023-05-18, 07:54 UTC
by Fla$her
No. wincmd.ini:
[ShortcutsWin]
A+G=SAVETABS
A+G_params="%|COMMANDER_PATH|\Tabs\Current.tab"
And what about the missing quotes?

Re: Support for parameters when binding commands to hotkeys

Posted: 2023-05-18, 09:36 UTC
by petermad
For some reason this does not work for keyboard remapping when using OPENTABMENU with a Parameter:

Code: Select all

[Shortcuts]
C+W=OPENBARMENU
C+W_params=%|COMMANDER_PATH|\default.bar
does NOT work

neither does:

Code: Select all

[Shortcuts]
C+W=OPENBARMENU
C+W_params=c:\totalcmd\default.bar

Wheras:

Code: Select all

[Shortcuts]
C+W=OPENBAR
C+W_params=%|COMMANDER_PATH|\default.bar
does work


As do:

Code: Select all

[Shortcuts]
C+X=OPENLANGUAGEFILE
C+X_params=%|COMMANDER_PATH|\language\wcmd_deu.lng


If I make an em_command like:

Code: Select all

[em_openbarmenu]
cmd=OPENBARMENU
then:

Code: Select all

[Shortcuts]
C+W=em_openbarmenu
C+W_params=%|COMMANDER_PATH|\default.bar
does NOT work either.

I haven't tried all the other "Commands with parameters" - maybe there are others that do not work.

Re: Support for parameters when binding commands to hotkeys

Posted: 2023-05-18, 13:28 UTC
by ghisler(Author)
It does not currently work with [ShortcutsWin], just with [Shortcuts]. [ShortcutsWin] only supports parameters for cm_ and em_ commands. I will fix it in beta 4.

Re: Support for parameters when binding commands to hotkeys

Posted: 2023-05-18, 14:29 UTC
by petermad
2ghisler(Author)
Please read my examples her above again - NONE of them are for [ShortcutsWin] - it is about OPENBARMENU not working with a path in the Parameters field - unlike all the other "Commands with parameters" do.

Re: Support for parameters when binding commands to hotkeys

Posted: 2023-05-19, 13:54 UTC
by ghisler(Author)
Are you using the 64-bit version? I noticed that OPENBARMENU would shortly open the menu but immediately close it again when invoked via hotkey. Removing all keyboad messages before opening the popup does seem to work, though. I have added that now for beta 4.

Re: Support for parameters when binding commands to hotkeys

Posted: 2023-05-19, 16:08 UTC
by petermad
ghisler(Author) wrote: 2023-05-19, 13:54 UTC Are you using the 64-bit version? I noticed that OPENBARMENU would shortly open the menu but immediately close it again when invoked via hotkey. Removing all keyboad messages before opening the popup does seem to work, though. I have added that now for beta 4.
Yes I was using 64bit TC

I can confirm that:

Code: Select all

[Shortcuts]
C+W=OPENBARMENU
C+W_params=%|COMMANDER_PATH|\default.bar
works in 32bit TC, and now that you say it I can see a VERY short blink on the screen, where the buttonbar was supposed to open in 64bit TC

Re: Support for parameters when binding commands to hotkeys

Posted: 2023-05-22, 10:04 UTC
by ghisler(Author)
Exactly, somehow the remaining key message(s) in the message queue seem to close the menu immediately.

Re: Support for parameters when binding commands to hotkeys

Posted: 2023-05-24, 18:43 UTC
by Fla$her
Fla$her wrote: 2023-05-18, 07:54 UTC No. wincmd.ini:
[ShortcutsWin]
A+G=SAVETABS
A+G_params="%|COMMANDER_PATH|\Tabs\Current.tab"
And what about the missing quotes?
TC 11.00b4:

Code: Select all

---------------------------
Total Commander
---------------------------
Function not implemented!

12345678
---------------------------
ОК   
---------------------------

Re: Support for parameters when binding commands to hotkeys

Posted: 2023-05-24, 19:02 UTC
by Sir_SiLvA
on a button only works if "SAVETABS %COMMANDER_PATH%\Tabs\Current2.tab" is in cmdline with proper %Commander_path%.
on shortcut not at all

Re: Support for parameters when binding commands to hotkeys

Posted: 2023-05-24, 19:54 UTC
by ghisler(Author)
The following works for me now:
[ShortcutsWin]
C+W=OPENBARMENU
C+W_params=%|COMMANDER_PATH|\default.bar

Can you try it?

I can confirm that SAVETABS doesn't work.

Re: Support for parameters when binding commands to hotkeys

Posted: 2023-05-24, 20:09 UTC
by Fla$her
ghisler(Author) wrote: 2023-05-24, 19:54 UTCCan you try it?
Works. See more here.

Re: Support for parameters when binding commands to hotkeys

Posted: 2023-05-24, 23:23 UTC
by petermad
ghisler(Author) wrote: 2023-05-24, 19:54 UTC The following works for me now:
[ShortcutsWin]
C+W=OPENBARMENU
C+W_params=%|COMMANDER_PATH|\default.bar

Can you try it?

I can confirm that SAVETABS doesn't work.
Yes that works now in 64bit TC 11.00b4 in both [Shortcuts] and [ShortcutsWin]

I also works with quotes:

Code: Select all

C+W=OPENBARMENU
C+W_params="%|COMMANDER_PATH|\default.bar"