Jump to content
Sign in to follow this  
AzKay

Timing.

Recommended Posts

If @HOUR = 2 or 4 or 6 or 8 or 10 or 12 or 14 or 16 or 18 or 20 or 22 or 24 Then _ReLog()

Would this work? As in, every 2 hours, it would do the function. Or, Would it call the function even if its like, "4:30" or something? Or not work atall?


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

This will not work. You will need to put it like this:

If @hour = 2 Or @hour = 4 Or @hour = 6 ...

Edit: I forgot to tell you, you would ofcourse need to loop this. It would probably also call at 4:30 etc.

Do you want to call it every 2 hours or just at the whole hour and skip one?

Edited by Manadar

Share this post


Link to post
Share on other sites

This will not work. You will need to put it like this:

If @hour = 2 Or @hour = 4 Or @hour = 6 ...

Edit: I forgot to tell you, you would ofcourse need to loop this. It would probably also call at 4:30 etc.

Do you want to call it every 2 hours or just at the whole hour and skip one?

Yes, Its in a loop, I want it to call on, every hour. So, at 2am, it would call, then call again at 4am, etc.

# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

You will have to wait for 4 PM to check if it works. :)

While 1
    If @MIN = 0 Then
        For $x = 0 to 24 step 2
            If @HOUR = $x Then
                ;call the function.
            EndIf
        Next
    EndIf
    Sleep(50000)
WEnd
Edited by Manadar

Share this post


Link to post
Share on other sites

You will have to wait for 4 PM to check if it works. :)

While 1
    If @MIN = 0 Then
        For $x = 0 to 24 step 2
            If @HOUR = $x Then
                ;call the function.
            EndIf
        Next
    EndIf
    Sleep(50000)
WEnd
Hmm, I ran it, then changed the PC's time to one minute before 4pm, and, it didnt call.

# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

I wasnt using sleep time. Ill try adding some x)

EDIT::

No difference.

EDIT::

My mistake, I had it set as 4:59 Hehe, But now, ill have to change it, because, it does the function every second after it hits 00.

Edited by AzKay

# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

If @MIN = 0 and @SEC = 0 Then
oÝ÷ Ûú®¢×z1qêm!Øjëh×6
Sleep(500)
    If @MIN = 0 Then
        If @SEC = 0 Then
            For $x = 0 to 24 step 2
                If @HOUR = $x Then
                    _ReLog()
                EndIf
            Next
        EndIf
    EndIf
WEnd

Well, doesnt really matter, not much difference =P


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

Yes, but what if the script is dynamic. And one time the run may take 20 seconds and the other it will take 2 hours. The run times would be wrong.

Thats why u time your-self say it takes u 1 hour it should take the bot 40 min- 1hour and 15 mins.

Pluess u are maken the Scrip so it should work right?

You did get this timer working right?

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  

×
×
  • Create New...