8218 Posted December 18, 2007 Posted December 18, 2007 Greetings AutoIT community. I' ve made the most of a script, but I need to finish it off. The part that I need to do is a part that takes consideration to the current time (Windows time) and then shuts down the computer at a specific time. So am I suposed to use a very big sleep function? Or is there any smart way to do it? Thanks very much
weaponx Posted December 18, 2007 Posted December 18, 2007 (edited) You could:A: Call shutdown.exe from the command line (XP);60 secondsshutdown -t 60B: Loop continuously in AutoIt until @HOUR AND @MIN match the desired shutdown time$sHour = 10 $sMin = 30 Do Sleep(100) Until @HOUR = $sHour AND @MIN = $sMin Shutdown(1)C: Add a an entry to the task scheduler to perform shutdown at specified date / timehttps://www.microsoft.com/resources/documen...s.mspx?mfr=true Edited December 18, 2007 by weaponx
8218 Posted December 18, 2007 Author Posted December 18, 2007 Thanks for the very helpfull answers weaponx. Was of great help. Consider this topic as end now
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now