Sign in to follow this  
Followers 0
elite

Wait for window to close

4 posts in this topic

I have a script that extracts data from a 3rd party database

Currently I just sleep for longer than I expect the extraction to take, but it would be nicer (and cleaner) if I could just wait for the window which states that extraction is in progress to close before moving on to my next command...

Any pointers would be really useful!

Share this post


Link to post
Share on other sites



I have a script that extracts data from a 3rd party database

Currently I just sleep for longer than I expect the extraction to take, but it would be nicer (and cleaner) if I could just wait for the window which states that extraction is in progress to close before moving on to my next command...

Any pointers would be really useful!

lol why don't you check out "WinWaitClose" in the helpfile?

Alzo


Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I have a script that extracts data from a 3rd party database

Currently I just sleep for longer than I expect the extraction to take, but it would be nicer (and cleaner) if I could just wait for the window which states that extraction is in progress to close before moving on to my next command...

Any pointers would be really useful!

WinWaitClose?

Or

While WinExists('Window To Wait On')
    Sleep(10)
WEnd
Do
    Sleep(10)
Until Not WinExists('Window To Wait On')
While 1
    If Not WinExists('Window To Wait On') Then ExitLoop
    Sleep(10)
WEnd
And so on and so on, this waits in the loops until the window doesn't exist any longer.

Edit:

I can't remember if WinWaitClose() is in Beta or not... Guess you could always find out.

Edit2:

In the future if you feel your code may be buggy, it might be a good idea to post it and get some helpful insight how to fix things.

Edited by SmOke_N

[center]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.[/center]

Share this post


Link to post
Share on other sites

Thanks guys - I'll endeavor to RTFM

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