David,

The window blur events are what you're after. Most likely, you will want to connect OnChildBlur from the DesktopWindow. See the scripting docs for specifics.

Regards,
Steve


On 5/2/2010 7:54 PM, David wrote:
Well, I think I was a bit too short, in my initial mail. Let me show a snip-it of the script, and then explain what I am after.
Sub Test( AWindow )
    Speak "I am now in another window. "
End Sub
ConnectEvent ActiveWindow, "ON{some kind of event}", "Test"
Allright, so what am I trying to do? I am trying to have the TEST sub run, whenever the user switches to another window - be it by Alt-Tab, or by opening a new window, or even closing the current window. Am I correct, when initializing the ActivWindow object here? And, which event - or even EVENTS - should I consider?
Hopefully, this message make a bit more sense, than my first one.
Thanks again. And if anyone have a scripting code, they would like me to take a look at, where a similar thing is done, I am always eager to learn.
----- Original Message -----
*From:* David <mailto:[email protected]>
*To:* Scripting List WE <mailto:[email protected]>
*Sent:* Monday, May 03, 2010 12:54 AM
*Subject:* Which event should I hook on to?

Hey you scripters,
Is there an event, that I can hook onto, that will fire, whenever a user Alt-Tab away from the current window?
Thanks a whole bunch!

I am using the Free version of SPAMfighter <http://www.spamfighter.com/len>.
We are a community of 7 million users fighting spam.
SPAMfighter has removed 1624 of my spam emails to date.
The Professional version does not have this message.

Reply via email to