Jump to content

Recommended Posts

Posted

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

Posted

  On 6/3/2011 at 4:55 PM, 'MrMitchell said:

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...