Jump to content

Looping


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)

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

Link to comment
Share on other sites

  • Developers

untested:

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...