Sign in to follow this  
Followers 0
PaulNewcum

test if window is ready, can take mouse clicks

3 posts in this topic

Hi,

I need a way to test if the window is ready to accept new mouse clicks.

The WinGetState function doesn't provide what I need, because it always returns 4 (Window is active), but the application itself (Windows Movie Maker, which is what I am trying to automate) is still not actually accepting new mouse clicks (I know it isn't because the AutoIt script issues the first mouse command, and I can see it actually works, so the Windows Movie Maker Project is being loaded just fine -- this loading process takes several seconds).

What happens is that AutoIt sends my next key commands and mouse commands to Windows Movie Maker, but because Windows Movie Maker is still loading, it blows through my issued key commands and mouse commands, and after loading the Windows Movie Maker project, the windows just sits there dumbly waiting for a real person to enter a real mouse command.

So I need a way to test if the windows is actually ready to accpet new mouse clicks, so I can then have AutoIt issue the proper ones, when the windows is ready.

Help and code examples are needed. Thanks. Paul Newcum

Share this post


Link to post
Share on other sites



Usually the keyboard buttons and mouse clicks are 'qeued' up in the window if it's currently proccessing somthing. Like if I open microsoft word and start typing random things before the actual word pane loads, it will spew them all in isntantly as soon as it's ready. There's no real way to tell if your window would does somthing imediatly with your simulated command (there might be some way to check a windows qeued up events though...you might try doing something like that) but you could guess by seeing what the processor usage is.

Share this post


Link to post
Share on other sites

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