Jump to content
Sign in to follow this  

Can AutoIt Be used to ...

Recommended Posts

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.


Share this post

Link to post
Share on other sites

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!

Share this post

Link to post
Share on other sites

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?

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...