@flyingDman thanks so much!! Exactly what I needed.
I have just 1 final question
Would it be possible to get a "favorite" part of the menu to always appear next to the cursor, while the rest is being opened normally with the bar breaks on the side?
Even if it's a trick, anything could help
Arrange menu Topic is solved
-
- Posts: 296
- Joined: 07 Nov 2020, 08:37
- flyingDman
- Posts: 2848
- Joined: 29 Sep 2013, 19:01
Re: Arrange menu
I am not sure I understand your question. You have full control over the location of each menu item but you cannot move columns around dynamically, so that if you have a menu with many columns and open it while your mouse pointer is on the right edge of the monitor, your first column will not be close to the mouse pointer. I am not aware of a way to dynamically change that.
14.3 & 1.3.7
Re: Arrange menu
If you just want a certain menu item to be under the cursor when the menu opens, just subtract the distance in pixels it is in the x and y directions from the upper-left corner of the menu from the variables x and y.
Re: Arrange menu
Hi I am a newbie. I can see the menu but can you give example how to get each button work ?
- flyingDman
- Posts: 2848
- Joined: 29 Sep 2013, 19:01
Re: Arrange menu
The "execute" label in my example above was left blank but that's where you would would put any action on the press on any of the buttons. One of the ways to handle a large amount of menu buttons is to use the switch .... case construction (see here: https://www.autohotkey.com/docs/commands/Switch.htm). Like so:
Which is quite a bit shorter than this:
Code: Select all
loop, 9
Menu, scripts, Add, test%a_index%, Execute, % !mod(a_index - 1,3) ? "+barbreak" : ""
Menu, scripts, Show
return
execute:
switch A_ThisMenuItem
{
case "test1" : msgbox, You clicked test1
case "test2" : msgbox, You clicked test2
case "test3" : msgbox, You clicked test3
case "test4" : msgbox, You clicked test4
case "test5" : msgbox, You clicked test5
case "test6" : msgbox, You clicked test6
case "test7" : msgbox, You clicked test7
case "test8" : msgbox, You clicked test8
case "test9" : msgbox, You clicked test9
}
return
Spoiler
14.3 & 1.3.7
Who is online
Users browsing this forum: Chunjee, Descolada, Google [Bot], GroggyOtter, moltenchees and 164 guests