Sign in to follow this  
Followers 0
keilamym

Looping

4 posts in this topic

is there an easy way to loop in a script, based on a window or variable?

example -

if a window or file doesn't appear, i want the script to loop a process (not using winwait)

example.

look for c:\complete.txt

if it does not exist, sleep for 5 seconds then look again.

if it finds it, then continue processing the script, if it does not, look again.

In version2, i would use goto commands with error levels, but goto doesn't exist in 3?

any help would be appreciated.

keilamym

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

untested:

While not FileExists("c:\complete.txt")
   Sleep(5000)
Wend
Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Yea, I use one like this to start up a script on one computer when anouther one updates a file:

While NOT FileExists("P:\removes"&@mon&"-"&@Mday&".txt")
    sleep(1000)
Wend

P: is a network drive


AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

thank you very much...

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