Posts: 11
Threads: 4
Joined: Dec 2008
could anyone tell me how to setup a file to run for a certain length of time? example say 1 hour and then restart after it shuts down. you guys helped me out with an error i had before and i am hoping i can add this to that same file. its flippin sweet but as i am i need more :lol: any help would be much grateful.
gd
Posts: 12,073
Threads: 140
Joined: Dec 2002
Macro
;double _time=10 ;;10 seconds
double _time=60*60 ;;1 hour
int t0(GetTickCount) t1(_time*1000)
rep
,if(GetTickCount-t0>=t1) break
,
,;here add your code
Posts: 11
Threads: 4
Joined: Dec 2008
if i am understanding this correctly, i inserted this code before my original code. it seems to wait 1 hour before letting the lines of code i have perform.
Posts: 229
Threads: 22
Joined: Sep 2007
this u may understand better
Function
Function
double _time=5 ;;5 seconds
;double _time=60*60 ;;1 hour
int t0(GetTickCount) t1(_time*1000)
rep
,if(GetTickCount-t0>=t1) break
,out "This code here and below that is tabbed will run untill time is reached"
,1
out "Time expired "