Sign in to follow this  
Followers 0
roofninja

time delay script

7 posts in this topic

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 !!!

Share this post


Link to post
Share on other sites



Take a look at this examples:

It´s good place to start.


Learn, learn and ... learn

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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 !!!

Share this post


Link to post
Share on other sites

A learning link of the day.. _DateAdd :huh2:


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

A learning link of the day.. _DateAdd :huh2:

I didn't see that. Thanks.


RUN . . . Slide . . . TAG . . . Your out . . . PAINTBALL !!!

Share this post


Link to post
Share on other sites

@roofninja - you bet, good luck!


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0