Page 1 of 2
The menu opened by OPENBARMENU is displayed at the cursor position.
Posted: 2024-10-25, 04:48 UTC
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.
Re: The menu opened by OPENBARMENU is displayed at the cursor position.
Posted: 2024-10-25, 23:45 UTC
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
Re: The menu opened by OPENBARMENU is displayed at the cursor position.
Posted: 2024-10-26, 09:34 UTC
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.
Re: The menu opened by OPENBARMENU is displayed at the cursor position.
Posted: 2024-11-08, 06:37 UTC
by yahuu
Is this suggestions not worth responding to?
Re: The menu opened by OPENBARMENU is displayed at the cursor position.
Posted: 2024-11-08, 09:14 UTC
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.
Re: The menu opened by OPENBARMENU is displayed at the cursor position.
Posted: 2024-11-09, 03:41 UTC
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
Re: The menu opened by OPENBARMENU is displayed at the cursor position.
Posted: 2024-11-09, 03:41 UTC
by yahuu
OPENBARMENU is a very good feature, and I hope it can play a greater role.
Re: The menu opened by OPENBARMENU is displayed at the cursor position.
Posted: 2024-11-09, 05:24 UTC
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.
Re: The menu opened by OPENBARMENU is displayed at the cursor position.
Posted: 2024-11-09, 07:28 UTC
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.
Re: The menu opened by OPENBARMENU is displayed at the cursor position.
Posted: 2024-11-09, 08:46 UTC
by Fla$her
2
yahuu
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.
Re: The menu opened by OPENBARMENU is displayed at the cursor position.
Posted: 2024-11-09, 14:59 UTC
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.
Re: The menu opened by OPENBARMENU is displayed at the cursor position.
Posted: 2024-11-10, 18:02 UTC
by Fla$her
The necessary functionality has already been added to ShowPopupMenu. Wait for the update.
Re: The menu opened by OPENBARMENU is displayed at the cursor position.
Posted: 2024-11-14, 15:18 UTC
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"?
Re: The menu opened by OPENBARMENU is displayed at the cursor position.
Posted: 2024-11-15, 02:06 UTC
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.
Re: The menu opened by OPENBARMENU is displayed at the cursor position.
Posted: 2024-11-15, 15:05 UTC
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.