can you please help with the some basic example of mmenu.
- Notepad should have simple tooltip like – creates and edits the text file using basic text formatting; it should execute “run notepad”
- Calc should have simple tooltip like – this simple calc application. Clicking on Calc it should execute run Calc.
- () Print should has tooltip like; this is text for print function. On click,it should types like “send print ()”
Any thought would be highly appreciate.
Code:
myMenu := MMenu_Create(C0 TFFFFFF), UtilsMenu := MMenu_Create(C0 TFFFFFF), SendStringsMenu := MMenu_Create(C0 TFFFFFF)
s = %A_WinDir%\System32\Shell32.dll
MMenu_Add(myMenu,"Notepad")
MMenu_Add(myMenu,"Wordpad")
MMenu_Add(myMenu)
MMenu_Add(myMenu,"Utils", s ":" 3, 0, "iv103 m" . UtilsMenu)
MMenu_Add(UtilsMenu,"Calc", s ":"8)
MMenu_Add(UtilsMenu,"Ms Paint", s ":"8)
MMenu_Add(myMenu,"Send Strings", s ":" 3, 0, "iv103 m" . SendStringsMenu)
MMenu_Add(SendStringsMenu,"print()", s ":" 9, 0, "")
MMenu_Add(SendStringsMenu,"exit ()", s ":" 9, 0, "")
MMenu_Show( 1, X, Y, "OnClick", "SOnSelect UOnUninit")
OnSelect:
MMenu_GetPosition(M_SMENU, X, Y) ;get the position of the currently open menu
msg := aMyTooltips%M_SID% ;M_SID is the item id
Tooltip %msg%, % X + 5, % Y – 30 ,Hi! ;and display tooltip above it
return
OnUninit:
Tooltip ;close the tooltip when the (sub)menu closes
return
MouseGetPos, x, y
MMenu_Show(myMenu, x, y, "OnItemClick")
Return
#include includes
#include MMenu.ahk
#include structs.ahk