Jump to content

Timing.


AzKay
 Share

Recommended Posts

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
Link to comment
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- #
Link to comment
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
Link to comment
Share on other sites

say you add this to a bot.

U can make it Run for 1 hour or what ever then Sleep tell 1-waht ever time is left for 2 hours.

Say this run takes 1 hour and 30 mins. the bot would sleep for 30 mins then rerun.

If so i may need this one day on a bot but till this day nice little 2 hour scrip.

Link to comment
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- #
Link to comment
Share on other sites

Try reducing the sleep time to 500


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
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- #
Link to comment
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- #
Link to comment
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?

Link to comment
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
 Share

  • Recently Browsing   0 members

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