Jump to content
Sign in to follow this  

need some help here - timer

Recommended Posts


#Include <Date.Au3>

Global $set_time

HotKeySet("{F6}", "StopLoop"); Press F6 to Stop

$set_time = InputBox("Set Time","Enter time to start wake : " & @LF & "Example : h:mm:ss AM / PM")
While 1
    Local $Current_Time = _NowTime ()
    Sleep ('150')
    If $Current_Time = $set_time Then
        MsgBox ('0','Notice',"Time now is : " & $set_time.",5)
        $set_time = $set_time + 3600000; set to wake every 1 hr

Func StopLoop()
EndFunc  ;==>_Quit

hi, anyone can help me with this timer program?

ok, i am writing this simple program to prompt me every hour at the specific time, i.e 2:39:45 PM, 3:39:45 PM, 4:39:45 PM . . . .

it seems that the "3600000" is not working?

anyone can help me? thanks.

Share this post

Link to post
Share on other sites

obvi this won't work.. the $Current_time is in hh:mm:ss format..

What good will adding 3600000 do to it..

Use stringsplit and add 1 to the hour part..

[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com

Share this post

Link to post
Share on other sites

hi, thanks for the pointers.

i have found my solution using _timetoticks and _tickstotime.

i have tried using stringsplit but then after splitting how do i join them back?

sorry for noob question but just wanting to learn more.

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.