Sign in to follow this  
Followers 0
ravenfrozt

Hey all! need help for a timer

3 posts in this topic

#1 ·  Posted (edited)

Hello all! I would like to know if there's a way to make a timer that pop up when the script start, showing the time it's running. Thanks for ya help :P

Edited by ravenfrozt

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I'm confused exactly what you want, I'm guessing more then this?

#Include <Date.Au3>
Msgbox(0,'The Time', 'The current time is: ' & _NowTime())

Sorry I misread what you said, here is an example of doing it:

AdlibEnable('_tooltip',1000)
Global $Timer = TimerInit()

While 1
    sleep(5000)
Wend

Func _tooltip()
    $TimeDif = TimerDiff($Timer)
    $time_hours = Int($TimeDif / 3600000)
    $time_mins = Int(($TimeDif - $time_hours * 3600000) / 60000)
    $time_secs = Int(($TimeDif - (($time_hours * 3600000) + ($time_mins * 60000))) / 1000)
    Tooltip('Time running: ' & $time_hours & ' Hours ' & $time_mins & ' Minutes ' & $time_secs & ' Seconds.',0,0)
EndFunc

I know it's probably not the the best way to get the minutes and seconds but it should work fine :P

Edited by foster74

Share this post


Link to post
Share on other sites

Thanks thats exactly what I wanted :P thank you ^^ finally woot tytyty

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  
Followers 0