Jump to content
Sign in to follow this  
sbonacina

Intercepting the window closing

Recommended Posts

sbonacina

Hello all,

I need to interact with an existing Window, which is non-autoit program launched by an autoit script.

To be precise, I need to intercept the window closing, i.e. the user clicking on the X to close the window.

Any help will be appreciated.

Best Regards

Stefano

Share this post


Link to post
Share on other sites
BrettF

Hello and welcome to the forums.

I am by no means an expert, but I imagine it will have to be done with some sort of window hook to the WM_CLOSE or simmilar.

Cheers,

Brett

Share this post


Link to post
Share on other sites
sbonacina

To be more precise, I need to remap the X button in order to save the current state of the application below and then to close the window and the application.

Share this post


Link to post
Share on other sites
BigDod

To be more precise, I need to remap the X button in order to save the current state of the application below and then to close the window and the application.

Have a look for AnyGUI in the example scripts, I think you might find something there to help you.


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites
sbonacina

Have a look for AnyGUI in the example scripts, I think you might find something there to help you.

Thanks! I will and get back to you

Share this post


Link to post
Share on other sites
sbonacina

Hi all

I repost in this section cause my question is GUI related.

I need to interact with an existing Window, which is non-autoit program launched by an autoit script.

To be precise, I need to intercept the window closing, i.e. the user clicking on the X to close the window, and remap the X button in order launch another application and close the first launched application.

Any help will be appreciated.

Best Regards

Stefano

Share this post


Link to post
Share on other sites
SmOke_N

Don't double post, topics merged.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
sbonacina

ummm, why? That is a maulware trick.

Funny, I didn't think of it.

Actually, I'm a bit lazy and not-so-skilled in C++, so I don't want to get through all the source code, which somebody else wrote.

:)

Share this post


Link to post
Share on other sites
SmOke_N

Funny, I didn't think of it.

Actually, I'm a bit lazy and not-so-skilled in C++, so I don't want to get through all the source code, which somebody else wrote.

:)

Then I'd suggest you speak with the author of the code (since you seem to have it), and ask for their help on how to accomplish what it is you want to do with their application.

Edit:

And you need to come up with a much better reason for wanting to do this.

Topic closed, do not start another.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×