Jump to content

Intercepting the window closing


sbonacina
 Share

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.


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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...