Jump to content
Sign in to follow this  
ev77

Can AutoIt Be used to ...

Recommended Posts

ev77

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!

Share this post


Link to post
Share on other sites
JLogan3o13

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?


√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites
ev77

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  

×