Jump to content

Detect when a window X is clicked


 Share

Recommended Posts

Have you tried using the native AutoIt function WinKill() on the IE7 window that needs to be closed?

Edit: If your only reason for detecting that the window has been closed is to close it faster, then WinKill() should work fine. If you are trying to do something else, then nevermind.

- The Kandie Man ;-)

Edited by The Kandie Man

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Link to comment
Share on other sites

Well, that shell hook I posted isn't a SetWindowsHookEx type hook, just a no-dll version of WH_SHELL which M$ thought to be worthwhile to be made for whatever reason. Other hooks need a dll, except for WH_KEYBOARD_LL, WH_MOUSE_LL as noted, and I think WH_JOURNALRECORD/WH_JOURNALPLAYBACK too.

"be smart, drink your wine"

Link to comment
Share on other sites

So that means you made me misinformed too.

Well not really, I was talking about hooks, the solutions that Smoke_N posted doesn't use hooks, but doesn't either to exactly what I had in mind(basically hooking into the window procedure, and waiting for either the WM_CLOSE, or the WM_SYSCOMMAND message...)

Edit:

I wonder over the reason that some hooks can be made without a dll, whilst some require it... Is there some technical obstacle that would prevent it, or is it just microsoft laziness?

Edited by FreeFry
Link to comment
Share on other sites

  • Moderators

Edit:

I wonder over the reason that some hooks can be made without a dll, whilst some require it... Is there some technical obstacle that would prevent it, or is it just microsoft laziness?

Not all "GUIs" are microsoft "standard".

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

Yeah, but still, wouldn't it be less of a hassle if the developer himself has to determine if the window is a microsoft standard one, and not having to use a dll just because?

// Sorry if I'm stealing your thread here R6V2.. curiosity strikes.

Link to comment
Share on other sites

  • Moderators

Yeah, but still, wouldn't it be less of a hassle if the developer himself has to determine if the window is a microsoft standard one, and not having to use a dll just because?

// Sorry if I'm stealing your thread here R6V2.. curiosity strikes.

Well, depending on the language they are using, they very well may have the choice on what type of standard/non-standard gui they choose to make. Edited by SmOke_N
Noticed ebonics

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

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
 Share

  • Recently Browsing   0 members

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