Jump to content
Sign in to follow this  
BinaryBrother

TimerInit()

Recommended Posts

BinaryBrother

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

Share this post


Link to post
Share on other sites
Jos

$timer = TimerInit()

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

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
BinaryBrother

$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

Share this post


Link to post
Share on other sites
L3G3NdKillEr

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

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.