Sign in to follow this  
Followers 0
JuggaloZeke

Responding to new windows?

7 posts in this topic

I want to make an AutoIt script, if possible, that will automatically send a few key presses when it detects a new window is activated.

So like if I was surfing the net and a pop-up popped up I would want it to detect something in the title or the window itself, activate the window, and then send a few key presses.

I'm really tired right now and didn't feel like looking it up [shoot me] but I will try when I wake up although I doubt I could figure it out myself so thanks to those who are willing to help.

Share this post


Link to post
Share on other sites



Hi,

did u try it with WinWait of WinWaitActive ?

Andre


What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel!

Share this post


Link to post
Share on other sites

WinWaitNotActive("")
Sleep(500)
Send("Text you want to send to the new window")

Share this post


Link to post
Share on other sites

WinWaitNotActive("")
Sleep(500)
Send("Text you want to send to the new window")

<{POST_SNAPBACK}>

What does the null parameter imply

Jay

Share this post


Link to post
Share on other sites

What does the null parameter imply

<{POST_SNAPBACK}>

It means that the script waits until active window's title is something else than empty ---> i.e. some window is actually activated.

Share this post


Link to post
Share on other sites

There is always a window active... "Program Manager" is the active window when the Desktop has focus.

Share this post


Link to post
Share on other sites

When dealing with popups, I use Handles usually. use WinGetHandle to get the handle of the window you want to stay up, and then you can close any popup window. Use a simple if WinGetHandle<>$storedhandle then.

Oh yea, also make sure the window is a webbrowsing window as well before closeing it.

Handles are nice, because you can have 30 windows open with the same title, but each has thier own unique handle.


AutoIt3, the MACGYVER Pocket Knife for computers.

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  
Followers 0