How do I make sure that when I click with the right mouse button it opens something as if it were a tooltip and that when I click on one of the options it would do the action according to it.
if someone can show me a generic example like the one I gave below or even make the code of what I did below thank you
EX:
right click
opens the tooltip with options 1 and 2
clicked 1
msgbox you clicked on option 1
right click
Re: right click
Code: Select all
Menu, options, Add, Option 1, Option1
Menu, options, Add, Option 2, Option2
#If !overClass("Shell_TrayWnd")
RButton::Menu, options, Show
#If
Option1:
MsgBox, 1
Return
Option2:
MsgBox, 2
Return
overClass(class) {
MouseGetPos,,, uid
WinGetClass, thisClass, ahk_id %uid%
Return thisClass = class
}
Re: right click
Code: Select all
#SingleInstance Force
Menu, MySubmenu, Add, SubItem1
Menu, MySubmenu, Add, SubItem2
Menu, MyMenu, Add, Item 1, :MySubmenu
Menu, MyMenu, Add, Item 2, Item2
RButton::
Menu, MyMenu, Show
return
SubItem1:
MsgBox, You clicked on SubItem1
return
SubItem2:
MsgBox, You clicked on SubItem2
return
Item2:
MsgBox, You clicked on Item2
return
Esc::
ExitApp