Jump to content

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
    EndIf
WEnd

Func StopLoop()
    Exit
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.

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