HockeyFan Posted November 27, 2006 Posted November 27, 2006 Hello! Can someone help me with a Do/Until loop that only waits 10 minutes to see if a condition is meet and then exits the loop? I have the following Do/Until loop that currently waits until the registry key is created... Do Sleep(5000) $RegKey = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\VirusScan Enterprise\CurrentVersion\Tasks\{A14CD6FC-3BA8-4703-87BF-E3247CE382F5}", "szTaskName") Until $RegKey = "AutoUpdate" ...but now I only want it to wait a maximum of 10 minutes. Any help would be greatly appriciated! Thanks.
Developers Jos Posted November 27, 2006 Developers Posted November 27, 2006 $Timer = TimerInit Do Sleep(5000) $RegKey = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\VirusScan Enterprise\CurrentVersion\Tasks\{A14CD6FC-3BA8-4703-87BF-E3247CE382F5}", "szTaskName") Until $RegKey = "AutoUpdate" or TimerDiff($Timer) > 60 * 10 *1000 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.
HockeyFan Posted November 27, 2006 Author Posted November 27, 2006 JdeB said: $Timer = TimerInit Do Sleep(5000) $RegKey = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\VirusScan Enterprise\CurrentVersion\Tasks\{A14CD6FC-3BA8-4703-87BF-E3247CE382F5}", "szTaskName") Until $RegKey = "AutoUpdate" or TimerDiff($Timer) > 60 * 10 *1000 Thank You!!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now