Jump to content

Time Functions in Autoit3


Recommended Posts

It would be better to use Windows Scheduled Tasks, and have it call a script that does the shutdown at a certain time. Otherwise, your script has to run continuously until the time arrives. Unless you have special circumstances that necessitate having a script run constantly, that's the way to go.

Now, as to scripting the startup of the computer... that's been discussed before:

http://www.autoitscript.com/forum/index.php?showtopic=31067

[font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]

Link to comment
Share on other sites

Yes I do plan on running the script 24/7, I found some code that I figure might work if I implement it into my main loop.

#include <Date.au3>

While 1

If _NowTime(4) = "21:31" Then ; added the 4 parameter, to exclude the seconds(i dont think if you wake one second later makes any difference )

MsgBox(0,"wake","up")

EndIf

Sleep(100)

WEnd

Will this work?

Thanks for the reply

MajSlayer420

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