roofninja Posted June 3, 2011 Share Posted June 3, 2011 This is my first try with Time stuff, and I am really confused. Nothing is making since to me. What I am trying to do is for the program to get the current local time and then add 5 minutes to it. Then wait or pause until it reaches that new time and then do something. Here is something that I started but it doesn't do much that is right. I am very lost on this... #include <Date.au3> Global $Sec, $Min, $Hour, $Time $t = _Date_Time_GetLocalTime() $t2 = _Date_Time_SystemTimeToTimeStr($t) $st = _TimeToTicks($t2) $et = $st + 45 * 60 * 1000 $t3 = _TicksToTime($et,$Hour,$Min,$Sec) MsgBox(0,"",$t2&"_"&$t3,8) RUN . . . Slide . . . TAG . . . Your out . . . PAINTBALL !!! Link to comment Share on other sites More sharing options...
realshyfox Posted June 3, 2011 Share Posted June 3, 2011 Take a look at this examples:It´s good place to start. Learn, learn and ... learn Link to comment Share on other sites More sharing options...
MrMitchell Posted June 3, 2011 Share Posted June 3, 2011 Why not just do Sleep(300000) then the rest of the script below that? Or are you specifically trying to learn how the _Date_Time_ functions work? Link to comment Share on other sites More sharing options...
roofninja Posted June 3, 2011 Author Share Posted June 3, 2011 Why not just do Sleep(300000) then the rest of the script below that? Or are you specifically trying to learn how the _Date_Time_ functions work?Both. This one needs a delay and I won't know when it got started. It is only run when the user logs in. I am also wanting to understand more of the Time stuff and expand my knowledge.Yes, using sleep will do the same but I didn't learn something today. RUN . . . Slide . . . TAG . . . Your out . . . PAINTBALL !!! Link to comment Share on other sites More sharing options...
somdcomputerguy Posted June 3, 2011 Share Posted June 3, 2011 A learning link of the day.. _DateAdd - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
roofninja Posted June 3, 2011 Author Share Posted June 3, 2011 A learning link of the day.. _DateAdd I didn't see that. Thanks. RUN . . . Slide . . . TAG . . . Your out . . . PAINTBALL !!! Link to comment Share on other sites More sharing options...
somdcomputerguy Posted June 4, 2011 Share Posted June 4, 2011 @roofninja - you bet, good luck! - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. 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