Reeya Posted February 11, 2011 Share Posted February 11, 2011 Hi, Can someone help me out the with the way to right click and quit an application from the system tray using AutoIT. Thanks in advance. Link to comment Share on other sites More sharing options...
Mat Posted February 11, 2011 Share Posted February 11, 2011 It depends. You need to understand that there is no one way that applications add those menus. Here at AutoIt we are spoilt that we have easy ways to do stuff like that, which AutoIt does most of the work for us. I answered something similar btw, it MAY apply to you if you are lucky, if not then it still has a few useful examples.In terms of AutoIt, most apps will handle messages for a right click, and then use TrackPopupMenu with the menu. Sometimes you get lucky, and the menu is created once at the beginning and reused, and a window will be listening for messages from it. In thiscase you can send the message directy to the window, which means you don't even need to work with the systray (that's what happened in the thread I linked to. To do that you need to get the menu item id. I use Winspector to listen for WM_COMMAND messages on a window I suspect will be handling it and then click on the menu item and hope. Other ways include checking the applications resources to see if they are using menu resources (using reshacker or similar). If you post information about the app then I may be to tell you a bit more, especially if it happens to be as program I already have.On the other hand, you may be unlucky, in which case you'll have to do a bit more work. If you can then I'd try and find exactly what happens when you click the menu icon, and then try and replicate it. Else you'll need work something else out.Mat AutoIt Project Listing Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now