c4mpi Posted February 25, 2010 Share Posted February 25, 2010 (edited) #include <IE.au3> $timer = TimerInit() While 1 Sleep(Random(1000,7000)) $timed = TimerDiff($timer) If $timed > 3000 Then _IECreate("www.google.com") $timer = TimerInit() EndIf WEnd $timer2 = TimerInit() While 2 Sleep(Random(1000,2000)) $timed2 = TimerDiff($timer2) If $timed2 > 5000 Then _IECreate("www.youtube.com.com") $timer2 = TimerInit() EndIf WEnd Why does this code fail? It doesnt open youtube.com every 5000 ms thanks for answers Edited February 25, 2010 by c4mpi Link to comment Share on other sites More sharing options...
Developers Jos Posted February 25, 2010 Developers Share Posted February 25, 2010 (edited) Why would it? It never leaves the first While-Wend loop. Edited February 25, 2010 by Jos 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 More sharing options...
c4mpi Posted February 25, 2010 Author Share Posted February 25, 2010 Why would it? It never leaves the first While-Wend loop.hehe, this is ofcourse a dumb question...how can I make it? Link to comment Share on other sites More sharing options...
Developers Jos Posted February 25, 2010 Developers Share Posted February 25, 2010 hehe, this is ofcourse a dumb question...how can I make it?Put both tests in the first loop? 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 More sharing options...
c4mpi Posted February 25, 2010 Author Share Posted February 25, 2010 Put both tests in the first loop?ty:) Link to comment Share on other sites More sharing options...
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