Jump to content

Recommended Posts

Posted

Hi All

Also referring to post:

similar post

I have followed the example in the above and cannot seem to get it to work to my needs, here is what i have so far

[/code]

$StartTime= "00:05"
$Currenttime= _NowTime(4)

If $Currenttime=$StartTime Then

Winactive("mywindow")
ControlClick("mybutton")

EndIf
[code]

Basically i need to just start a program and hit a button at a particular time (after i leave the office)

I think i need to add a pause in there of some type, for it to keep looping and checking until it reaches the time i want it to start., as when i start the macro, it just starts and then stops, as currentime doesnt equal starttime

Any hints on how to do this?

Thanks

Posted

Try this:

#include <Date.au3>

$StartTime = "12:01"

Do
    Sleep(1000)
Until _NowTime(4) >= $StartTime

MsgBox(0, "Timer", $StartTime)oÝ÷ Øêí+ºÚ"µÍÌÍÔÝ[YHH    ][ÝÌL
I][ÝÂÂTÛY
L
B[[ÕT  [É][ÝÎ][ÝÉ[ÈRS    ÝÏH   ÌÍÔÝ[YBÙÐÞ
    ][ÝÕ[Y][ÝË  ÌÍÔÝ[YJ

:D

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
×
×
  • Create New...