Jump to content

TimerInit()


Recommended Posts

Alright guys... I have gobs of mess, which I've said I'll post when finished.. Hehe... :) Anyways...

Is this possible?

While 1
$timer = TimerInit()
If StringInStr($timer, "120000") Then
Send("2 mins has passed")
WEnd

I need a command to be sent every 120 seconds, or 2 mins. Do I do this using TimerInit(), no help hardly at all is suppled... :P

SIGNATURE_0X800007D NOT FOUND

Link to comment
Share on other sites

  • Developers

$timer = TimerInit()

While 1
    If TimerDiff($timer) > 119999) Then
        Send("2 mins has passed")
        $timer = TimerInit()
    EndIf
WEnd

Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

$timer = TimerInit()
$timer = TimerInit()

While 1
    If TimerDiff($timer) > 119999) Then
        Send("2 mins has passed")
        $timer = TimerInit()
    EndIf
WEnd

Thanks man.. :)

Edited by JdeB

SIGNATURE_0X800007D NOT FOUND

Link to comment
Share on other sites

Try This Out tooltip timer

CODE
;Khurram & Saeed

;Minutes/seconds/miliseconds

; Author - Valuater

$Minutes = 1 ; will wait 1 minutes

Local $60Count = 0, $begin = TimerInit()

While $Minutes > $60Count

$dif = TimerDiff($begin)

$dif2 = StringLeft($dif, StringInStr($dif, ".") -1)

$Count = int($dif/1000)

$60Count = Int($Count / 60)

ToolTip("Minutes Required = " & $Minutes & @CRLF & "Minutes Past = " & $60Count & @CRLF & "Seconds Count = " & $Count & @CRLF & "Mili-Seconds Count = " & $dif2, 10, 10, "Timer", "", )

Sleep(20)

WEnd

MsgBox(64, "Timer", "1 minute has passed")

Edited by L3G3NdKillEr

i'm very responsible, when ever something goes wrong they always say I'm responsible.Life is like an Adventure... BUT COOL GRAPHICS<====================----=LEGEND KILLER=----=========================>

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