How to intercept the tray menu?
How to intercept the tray menu?
Right click on the tray icon to execute the command directly instead of displaying the menu. Excuse me, how to achieve(V2)?
- JoeWinograd
- Posts: 2198
- Joined: 10 Feb 2014, 20:00
- Location: U.S. Central Time Zone
Re: How to intercept the tray menu?
I like to give credit where credit is due, but I don't know who wrote this code. I do know that it's from this group...that I didn't write it...and that it works perfectly:
My thanks to the member who wrote the code...and apologies for not being to acknowledge who you are. Regards, Joe
Code: Select all
Menu,Tray,NoStandard
OnMessage(0x404,"AHK_NOTIFYICON")
AHK_NOTIFYICON(wParam,lParam)
{
If (lParam=0x201) ; WM_LBUTTONDOWN
{
; left-click code here
MsgBox left-click code here
}
If (lParam=0x204) ; WM_RBUTTONDOWN
{
; right-click code here
MsgBox right-click code here
}
Return
}
Re: How to intercept the tray menu?
Thank you. This is exactly what I need.
- JoeWinograd
- Posts: 2198
- Joined: 10 Feb 2014, 20:00
- Location: U.S. Central Time Zone
Re: How to intercept the tray menu?
You're welcome. Glad to hear that's what you need. Regards, Joe