Jump to content
Sign in to follow this  


Recommended Posts


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)


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.


Share this post

Link to post
Share on other sites


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

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        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")

P: is a network drive

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.