Guest someguy Posted June 15, 2004 Share Posted June 15, 2004 I was wondering if you could put in say a count down in ascript. TO have it press buttons after say 1hr and then after its done reset countdown to 1hr and keep running the main script. I just dont know the code i need to do it. Thanks Link to comment Share on other sites More sharing options...
tutor2000 Posted June 15, 2004 Share Posted June 15, 2004 I was wondering if you could put in say a count down in ascript. TO have it press buttons after say 1hr and then after its done reset countdown to 1hr and keep running the main script. I just dont know the code i need to do it.Thankswhile 1sleep(60000)do my thingwend;this will loop continuously Link to comment Share on other sites More sharing options...
Guest Guest Posted June 15, 2004 Share Posted June 15, 2004 Thanks now do i put this at the end of my main script or in with my main script? Link to comment Share on other sites More sharing options...
pekster Posted June 15, 2004 Share Posted June 15, 2004 I was wondering if you could put in say a count down in ascript. TO have it press buttons after say 1hr and then after its done reset countdown to 1hr and keep running the main script. I just dont know the code i need to do it.Use a timer and test it every iteration of the loop: $timer = TimerStart() While TimerStop($timer) < 60 * 60 * 1000 ;1 hour = 60 seconds * 60 minutes * 1000 milliseconds ;your code goes here as required WEnd Please note that if your code doesn't include a sleep, you should probably use a Sleep(100) somewhere in the loop to prevent from maxing out your CPU. [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Link to comment Share on other sites More sharing options...
tutor2000 Posted June 15, 2004 Share Posted June 15, 2004 sleep(3600000)No more numbers for me until coffeeRick 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