The menu opened by OPENBARMENU is displayed at the cursor position.

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

User avatar
yahuu
Member
Member
Posts: 122
Joined: 2015-01-15, 03:19 UTC

The menu opened by OPENBARMENU is displayed at the cursor position.

Post by *yahuu »

Could you add parameters to OPENBARMENU to control the position where the menu appears?

Default position.
Display at the cursor position.
Display at the mouse position.
License #301983 (2016)
TC 11.51 32+64bit on 10 (21H2) 64bit, 'Everything' 1.5.0.1388a
Autorun 2.2.18.1
User avatar
petermad
Power Member
Power Member
Posts: 16021
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: The menu opened by OPENBARMENU is displayed at the cursor position.

Post by *petermad »

Display at the cursor position.
Isn't that what already happens when you press Enter on the file if it is Internally associated with the file type?

Or are you talking about using it with a keyboard shortcut to an em_command with the OPENBARMENU
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
yahuu
Member
Member
Posts: 122
Joined: 2015-01-15, 03:19 UTC

Re: The menu opened by OPENBARMENU is displayed at the cursor position.

Post by *yahuu »

petermad wrote: 2024-10-25, 23:45 UTC
Display at the cursor position.
Or are you talking about using it with a keyboard shortcut to an em_command with the OPENBARMENU
The menu displayed by the em_command using OPENBARMENU, when shown with a hotkey, is also in the upper left corner.

I did not create a bar for a specific file type;
I created a bar to comment on the progress of files and folders. Therefore, I need to display the menu near the objects being operated on.
License #301983 (2016)
TC 11.51 32+64bit on 10 (21H2) 64bit, 'Everything' 1.5.0.1388a
Autorun 2.2.18.1
User avatar
yahuu
Member
Member
Posts: 122
Joined: 2015-01-15, 03:19 UTC

Re: The menu opened by OPENBARMENU is displayed at the cursor position.

Post by *yahuu »

Is this suggestions not worth responding to?
License #301983 (2016)
TC 11.51 32+64bit on 10 (21H2) 64bit, 'Everything' 1.5.0.1388a
Autorun 2.2.18.1
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50463
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: The menu opened by OPENBARMENU is displayed at the cursor position.

Post by *ghisler(Author) »

OPENBARMENU is not meant to be used on buttons, although it can be used there. Instead, just enter the path+name to the button bar. Then there will be a checkbox to show it as a menu, and it will be opened directly below the button as expected.
Author of Total Commander
https://www.ghisler.com
User avatar
yahuu
Member
Member
Posts: 122
Joined: 2015-01-15, 03:19 UTC

Re: The menu opened by OPENBARMENU is displayed at the cursor position.

Post by *yahuu »

I am not using it as a button; I have made the bar into an em command and used OPENATTRIBUTES, hoping that the menu will appear at the cursor position. Originally, I could achieve this with autorun's ShowPopupMenu, but unfortunately, it does not support OPENATTRIBUTES.
Now I have to use AHK to move this menu to the cursor position, and I can clearly see a flashing movement process, which is quite awkward.

Code: Select all

[Buttonbar]
Buttoncount=3
button1=wcmicons.dll,59
cmd1=OPENATTRIBUTES
param1==NotStarted
iconic1=0
menu1=(&A)NotStarted ⚪
button2=wcmicons.dll,60
cmd2=OPENATTRIBUTES
param2==InProcess
iconic2=0
menu2=(&B)InProcess ⏳
button3=wcmicons.dll,61
cmd3=OPENATTRIBUTES
param3==Completed
iconic3=0
menu3=(&C)Completed ✔️

[em_ProcessBar]
cmd=OPENBARMENU
param=%|COMMANDER_PATH|\USER\Bars\process.bar	
Last edited by yahuu on 2024-11-09, 03:44 UTC, edited 1 time in total.
License #301983 (2016)
TC 11.51 32+64bit on 10 (21H2) 64bit, 'Everything' 1.5.0.1388a
Autorun 2.2.18.1
User avatar
yahuu
Member
Member
Posts: 122
Joined: 2015-01-15, 03:19 UTC

Re: The menu opened by OPENBARMENU is displayed at the cursor position.

Post by *yahuu »

OPENBARMENU is a very good feature, and I hope it can play a greater role.
License #301983 (2016)
TC 11.51 32+64bit on 10 (21H2) 64bit, 'Everything' 1.5.0.1388a
Autorun 2.2.18.1
Fla$her
Power Member
Power Member
Posts: 2996
Joined: 2020-01-18, 04:03 UTC

Re: The menu opened by OPENBARMENU is displayed at the cursor position.

Post by *Fla$her »

yahuu wrote: 2024-11-09, 03:41 UTC Originally, I could achieve this with autorun's ShowPopupMenu, but unfortunately, it does not support OPENATTRIBUTES.
The author has already been asked to support such parameterized commands for WM_CopyData, but there is still no reaction. So this is not so much a plugin problem as a TC problem.
But you can still run ShowPopupMenu ... CommandExec em_OPENATTRIBUTES <Settings>, where OPENATTRIBUTES= and %A are written.
Last edited by Fla$her on 2024-11-09, 08:30 UTC, edited 1 time in total.
Overquoting is evil! 👎
User avatar
yahuu
Member
Member
Posts: 122
Joined: 2015-01-15, 03:19 UTC

Re: The menu opened by OPENBARMENU is displayed at the cursor position.

Post by *yahuu »

Fla$her wrote: 2024-11-09, 05:24 UTC But you can still run ShowPopupMenu ... CommandExec em_OPENATTRIBUTES <Settings>, where OPENATTRIBUTES= and %A are written.
Using ShowPopupMenu to display the .bar, and calling OPENATTRIBUTES with em_OPENATTRIBUTES in the .bar is also ineffective.
The .bar functions normally as a menu in TC.
License #301983 (2016)
TC 11.51 32+64bit on 10 (21H2) 64bit, 'Everything' 1.5.0.1388a
Autorun 2.2.18.1
Fla$her
Power Member
Power Member
Posts: 2996
Joined: 2020-01-18, 04:03 UTC

Re: The menu opened by OPENBARMENU is displayed at the cursor position.

Post by *Fla$her »

2yahuu
Sorry, crossed it out, it doesn't work that way.
yahuu wrote: 2024-10-25, 04:48 UTC Display at the mouse position.
Not the mouse itself, but the mouse cursor. You can do this with ShowPopupMenu.
yahuu wrote: 2024-10-25, 04:48 UTC Display at the cursor position.
You can try ShowPopupMenu + WinSetPos. You can also move the cursor with cm_ShowHint (SendCommand 2914).
But personally, I am satisfied with the ability to position the menu in the center of the active panel or with reference to its borders, taking into account the selection of several objects.

As for the request itself, I would prefer a parameter (path to ini with [Associations]) for cm_ContextMenuInternal and cm_ContextMenuInternalCursor.
Overquoting is evil! 👎
User avatar
yahuu
Member
Member
Posts: 122
Joined: 2015-01-15, 03:19 UTC

Re: The menu opened by OPENBARMENU is displayed at the cursor position.

Post by *yahuu »

Thank you for your suggestion. Currently, I am using AHK for movement. The parameters can be set to the mouse position or the cursor position.
However, the menu will first appear in the top left corner and then be moved to the specified position, so there is a movement process involved.
License #301983 (2016)
TC 11.51 32+64bit on 10 (21H2) 64bit, 'Everything' 1.5.0.1388a
Autorun 2.2.18.1
Fla$her
Power Member
Power Member
Posts: 2996
Joined: 2020-01-18, 04:03 UTC

Re: The menu opened by OPENBARMENU is displayed at the cursor position.

Post by *Fla$her »

The necessary functionality has already been added to ShowPopupMenu. Wait for the update.
Overquoting is evil! 👎
User avatar
yahuu
Member
Member
Posts: 122
Joined: 2015-01-15, 03:19 UTC

Re: The menu opened by OPENBARMENU is displayed at the cursor position.

Post by *yahuu »

Fla$her wrote: 2024-11-10, 18:02 UTC The necessary functionality has already been added to ShowPopupMenu. Wait for the update.
With the help of Loopback, I used the following method, which is better than the AHK solution. From the moment it appears to jumping to the target position, it is almost imperceptible.

Code: Select all

Func DisplayProcessBar
   CommandExec em_ProcessBar
   Sleep(15)
   MouseGetPos("x", "y")
   WinSetPos(x+10, y,"","","", WinFind(0, "#32768"))
EndFunc

[em_ProcessBar]
cmd=OPENBARMENU
param=%|COMMANDER_PATH|\USER\Bars\process.bar
What exactly do you mean by "necessary functionality"?
License #301983 (2016)
TC 11.51 32+64bit on 10 (21H2) 64bit, 'Everything' 1.5.0.1388a
Autorun 2.2.18.1
Fla$her
Power Member
Power Member
Posts: 2996
Joined: 2020-01-18, 04:03 UTC

Re: The menu opened by OPENBARMENU is displayed at the cursor position.

Post by *Fla$her »

yahuu wrote: 2024-11-14, 15:18 UTC to the target position
What do you mean by the target position? You had to place it under the cursor.
yahuu wrote: 2024-11-14, 15:18 UTC What exactly do you mean by "necessary functionality"?
1. New screen coordinate parameters <x> <y>.
2. New /A:16384 flag for the location under the cursor on the active panel.

As I have already written, it's better to discuss these things in the appropriate topic.
Overquoting is evil! 👎
User avatar
yahuu
Member
Member
Posts: 122
Joined: 2015-01-15, 03:19 UTC

Re: The menu opened by OPENBARMENU is displayed at the cursor position.

Post by *yahuu »

Fla$her wrote: 2024-11-15, 02:06 UTC What do you mean by the target position? You had to place it under the cursor.
That's it
2. New /A:16384 flag for the location under the cursor on the active panel.
License #301983 (2016)
TC 11.51 32+64bit on 10 (21H2) 64bit, 'Everything' 1.5.0.1388a
Autorun 2.2.18.1
Post Reply