Open a button menu using a command
Moderators: Hacker, petermad, Stefan2, white
- Balderstrom
- Power Member
- Posts: 2148
- Joined: 2005-10-11, 10:10 UTC
Display it where the MouseCursor is...like a contextMenu is done.
Of course the context-menu button on my keyboard itself, doesn't seem to be related to the mouse cursor at all. In opera it seems to open primarily milddle of the screen, and in TC it seems to bounce around.
Of course the context-menu button on my keyboard itself, doesn't seem to be related to the mouse cursor at all. In opera it seems to open primarily milddle of the screen, and in TC it seems to bounce around.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
- Balderstrom
- Power Member
- Posts: 2148
- Joined: 2005-10-11, 10:10 UTC
As far as deciding where to open the menu, one or two wincmd.ini settings, with sane defaults would settle that issue.
OpenManualButtonBarLocation=
1: TopLeft of active panel.
2: TopRight of active panel.
4: Outside of active panel:
__ TopLeft, if panel is left.
__ TopRight, if panel is right.
8: Inside of active panel:
__ TopRight, if panel is left.
__ TopLeft, is panel is right.
16: At the cursor position
1024: At the mouse cursor, if it is within TC's window.
__ Else one of the previous settings (1-16)
The code used to display a drop-down button-bar menu on the existing Main button-bar is all that would be needed --- so long as we can indicate where the menu should open as noted above.
A few more positions could be added easily enough - if suggestions were requested for any other needed positions before implementing the feature.
OpenManualButtonBarLocation=
1: TopLeft of active panel.
2: TopRight of active panel.
4: Outside of active panel:
__ TopLeft, if panel is left.
__ TopRight, if panel is right.
8: Inside of active panel:
__ TopRight, if panel is left.
__ TopLeft, is panel is right.
16: At the cursor position
1024: At the mouse cursor, if it is within TC's window.
__ Else one of the previous settings (1-16)
The code used to display a drop-down button-bar menu on the existing Main button-bar is all that would be needed --- so long as we can indicate where the menu should open as noted above.
A few more positions could be added easily enough - if suggestions were requested for any other needed positions before implementing the feature.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
Re:
Hi guys,
As far as I understand this is the closest thread that discusses my challenge and unfortunately it appears with no resolution ... even worse the specific inquiry had been shifted and lost.
As @StickyNomad commented the point is to start/activate/click a specific item/position/button from a button bar
The question is if there is such a command or eventually one could be crafted so that based on number parameter activates the button on the respective position in the current active button bar.
Please note: the point is not to open a new button bar, but activate a button from the active button bar with a command to which I hopefully can assign a shortcut key.
The parameter would open position from either the left side = positive numbers or the right side = negative numbers
Please check the picture, where on top are the positive number positions as proposed for a number and below the button bar is the negative positioning Image: https://ibb.co/ngyxf2S
I hope @Lefteous had the same thing in mind in 2009
As far as I understand this is the closest thread that discusses my challenge and unfortunately it appears with no resolution ... even worse the specific inquiry had been shifted and lost.
StickyNomad wrote: 2009-05-11, 14:56 UTC OPENBAR opens another BAR-file and replaces the currently displayed buttonbar with the specified one. Lefteous looks for a way to open the pulldown menu of a button (when 'show as menu' is activated) with a command.
I support this request if this isn't possible already.
As @StickyNomad commented the point is to start/activate/click a specific item/position/button from a button bar
The question is if there is such a command or eventually one could be crafted so that based on number parameter activates the button on the respective position in the current active button bar.
Please note: the point is not to open a new button bar, but activate a button from the active button bar with a command to which I hopefully can assign a shortcut key.
The parameter would open position from either the left side = positive numbers or the right side = negative numbers
Please check the picture, where on top are the positive number positions as proposed for a number and below the button bar is the negative positioning Image: https://ibb.co/ngyxf2S
I hope @Lefteous had the same thing in mind in 2009
Re: Open a button menu using a command
I've also wanted this for a long time. Support +++
2igarny
I understand that this is not exactly the same, but you can call the menu separately using autorun.wdx.
Example of an entry in autorun.cfg:
2igarny
I understand that this is not exactly the same, but you can call the menu separately using autorun.wdx.
Example of an entry in autorun.cfg:
Code: Select all
LoadLibrary Plugins\Autorun_Tweaks.dll
# Open the menu under the top of the panels middle by Ctrl + Alt + 1:
SetHotkeyAction /K:C /K:A /H:1 ShowPopupMenu /A:128:8192 '%COMMANDER_PATH%\Bars\My.bar'
Overquoting is evil! 👎
Re: Open a button menu using a command
Unfortunately this doesn't click / activate a button on the current active bar, but opens a new one
I would even be happy, if there is an option / commands for moving selection / focus left or right and activating these. Hoping to be able to combine these with menu commands of TC to achieve the same goal# Open the menu under the top of the panels middle by Ctrl + Alt + 1:
SetHotkeyAction /K:C /K:A /H:1 ShowPopupMenu /A:128:8192 '%COMMANDER_PATH%\Bars\My.bar'
Re: Open a button menu using a command
I wrote that it's not the same. It may not be so beautiful, but from the point of view of benefits it's no worse.igarny wrote: 2023-04-14, 16:04 UTCUnfortunately this doesn't click / activate a button on the current active bar, but opens a new one
In my experience, moving the focus only with the arrows is slow. It looks more acceptable to pre-move through the separators using Ctrl+Right.igarny wrote: 2023-04-14, 16:04 UTCI would even be happy, if there is an option / commands for moving selection / focus left or right and activating these.
For example, with TCFS2 you can press the 4th button after the 5th separator:
Code: Select all
%COMMANDER_PATH%\Addons\TCFS2\TCFS2.exe /ef tcm(4004) send(`^{RIGHT 5}{RIGHT 3}{ENTER}`)
Code: Select all
%COMMANDER_PATH%\Addons\TCFS2\TCFS2.exe /ef tcm(4004) send(`^{RIGHT 6}+{LEFT 3}{ENTER}`)
Overquoting is evil! 👎
Re: Open a button menu using a command
2ghisler(Author)
1. How easy is it technically to implement the ability to instantly move the focus to a button with a certain number and press?
2. Or implement the display of a drop-down menu under your button by calling it by index on the current toolbar? OPENBARMENUBYINDEX ?
1. How easy is it technically to implement the ability to instantly move the focus to a button with a certain number and press?
2. Or implement the display of a drop-down menu under your button by calling it by index on the current toolbar? OPENBARMENUBYINDEX ?
Overquoting is evil! 👎
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Open a button menu using a command
It's not quite clear what you want to achieve, and why. For example, why do you want to show the menu for a certain button and not for a certain bar file?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Open a button menu using a command
2 reasons when using hotkeys:ghisler(Author) wrote: 2023-05-19, 13:59 UTC For example, why do you want to show the menu for a certain button and not for a certain bar file?
1. It is more convenient from the point of view of visual perception, when you look at the buttons and without having to remember the intended purpose, you understand which of them should show the menu.
2. Visually, it looks much more aesthetically pleasing when the menu opens under the corresponding button on the current toolbar, and not somewhere on the left side of the window.
Overquoting is evil! 👎
Re: Open a button menu using a command
igarny wrote: 2023-04-14, 10:58 UTC based on number parameter activates the button on the respective position in the current active button bar.
Bump for v.11.50
Overquoting is evil! 👎