Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Submenu horizontal position
#1
I have a menu with several items, that is about 800x600 pixels in size. My screen resolution is 1920x1200. My menu has several submenus also. I have set a macro to make this menu appear with first item just under the mouse:

Code:
Copy      Help
mac "MenuMain" "" (xm-60) (ym-10)

My problem is about submenus.
If I move the mouse too close to the right side of the screen, my main menu works regularly; but, when in this situation I make a submenu appear, since there’s not enough space in the right side of the main menu, the submenu appears completely at the left edge of main menu, so that I have to move the mouse pointer at left to reach it, jumping over the entire main menu. I have to move quickly my mouse pointer, otherwise the submenu disappears while I’m moving the mouse towards left.
I think that it would be more logical if, in this situation, the submenu would appear near the mouse pointer, instead of appearing next to the left edge of main menu.
I have attached here a drawing explaining the situation.


Attached Files Image(s)
   
#2
Then the submenu would cover the main menu.

This will move the mouse to the submenu when you click the first menu (the submenu item) when the submenu is already visible. Works with QM menus and all standard menus.
Function MouseToSubmenu
Trigger #L 0x1     Help - how to add the trigger to the macro
Code:
Copy      Help
int w1=win(mouse)
;outw w1
if(!wintest(w1 "" "#32768")) ret
int tid=GetWindowThreadProcessId(w1 0)
int w2=win("" "#32768" "" 0x400 F"threadId={tid}")
if(!w2 or w2=w1) ret
;outw w2
mou 0.5 0.5 w2
note: the trigger is "mouse left click, don't eat".

Or create another menu instead of submenu.

Menu Menu1
Code:
Copy      Help
aaaaaaaaaaaaaaaaaaaaa :out 1
>bbbbbbbbbbbbbbbbbbbbb
,cccccccccccccccccccccc :out 2
,dddddddddddddddddddddd :out 3
replace to
Menu Menu1
Code:
Copy      Help
aaaaaaaaaaaaaaaaaaaaa :out 1
bbbbbbbbbbbbbbbbbbbbb :mac "Menu2"
Menu Menu2
Code:
Copy      Help
cccccccccccccccccccccc :out 2
dddddddddddddddddddddd :out 3


Forum Jump:


Users browsing this thread: 1 Guest(s)