ev77 Posted March 6, 2012 Share Posted March 6, 2012 I would like to beable to intercept a close to an app initiatyed by clicking the "X" in the upper right corner of its window. Then, If multiple instances exist Allow the instance to be closed normally Else if only one instance exists Minimize it instead of closing it Is it possible to do this with an AutoIt Script? If so, any pointers would be appreciated. THANKS! Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 6, 2012 Moderators Share Posted March 6, 2012 Hi, ev77. Your post is a little less than clear. Do you mean that you are trying to intercept when a user clicks on the red X to close a window, and perform some other action? If that is the case, is this a GUI you have created, or some third party software? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
ev77 Posted March 8, 2012 Author Share Posted March 8, 2012 Yes, I would like to intercept the click on the red X or intercept the WM_Close message. I would like to be able to determine how many instances of this app APP currently exist. Based on that, I would like to be able allow the close to take place, OR prevent the close and send a WM_SYSCOMMAND with wparam set to SC_MINIMIZE. So I guess I need to ask the questions: Using AutoIt, Can I intercept a WM_Close message to a specified window? Can I determine if more than one instance of its app is running? Can I send a WM_SYSCOMMAND to a window? 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