Jump to content

Recommended Posts

Posted

Hi I want that my program "program.exe" runs at 11:50 p.m.

I don't want to use the task planer of windows and others.

Can I program this with autoit.

How can i do this?

Thanks

Posted

A basic example

$hour = @HOUR
$minute = @MIN
$time = $hour & ":" & $minute

While 1
    Sleep(10)
    if $time = "23:50" Then
        MsgBox(0, "Time" , "The required time is now")
    EndIf
WEnd


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Posted

It tried this, but it doesn't run.

If I run this script at the time it is named in the script, then it runs.

But I want to run the script at morning and then after some hours this script should run my program.

Posted

It tried this, but it doesn't run.

If I run this script at the time it is named in the script, then it runs.

But I want to run the script at morning and then after some hours this script should run my program.

Look at the TimerInt/TimerDiff Functions in the helpfile if you just want it to run like 8 hours after you start the script
Posted

I messed up my first example. The variables should be inside the loop.

While 1
    Sleep(10)
    $hour = @HOUR
    $minute = @MIN
    $time = $hour & ":" & $minute
    if $time = "14:30" Then
        MsgBox(0, "Time" , "The required time is now")
    EndIf
WEnd


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Posted

I messed up my first example. The variables should be inside the loop.

While 1
    Sleep(10)
    $hour = @HOUR
    $minute = @MIN
    $time = $hour & ":" & $minute
    if $time = "14:30" Then
        MsgBox(0, "Time" , "The required time is now")
    EndIf
WEnd
why do you need the variables at all? Would'nt this work also?

While 1
    Sleep(200); less CPU intesive
    if (@HOUR = "16" and @MIN = "22") Then
        MsgBox(0, "Time" , "The required time is now")
    EndIf
WEnd

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

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