Gif Posted April 27, 2007 Posted April 27, 2007 How Can I use the shutdown command [for example shutdown(2)] adding a timer that counts down the shutting of the pc? Nothing visually...
Zedna Posted April 27, 2007 Posted April 27, 2007 Add Sleep() before ShutDown() Resources UDF ResourcesEx UDF AutoIt Forum Search
searchresult Posted April 27, 2007 Posted April 27, 2007 (edited) How Can I use the shutdown command [for example shutdown(2)] adding a timer that counts down the shutting of the pc? Nothing visually... $option = InputBox("Shutdown", "Option: 1 = Logoff 2 = Shutdown 3 = Reboot 4 = Power down 5= Suspend 6= Hibernate") If $option = "" or $option < 1 or $option > 6 Then MsgBox(48, "Error", "Wrong option", 5) Exit Else $time = InputBox("Shoutdown time", "Enter time in seconds: ") Sleep($time) If $option = 1 Then Shutdown(0) ElseIf $option = 2 Then Shutdown(1) ElseIf $option = 3 Then Shutdown(2) ElseIf $option = 4 Then Shutdown(8) ElseIf $option = 5 Then Shutdown(32) ElseIf $option = 6 Then Shutdown(64) EndIf EndIf Exit Hope it helps Edited April 27, 2007 by searchresult
Zedna Posted April 27, 2007 Posted April 27, 2007 $time = InputBox("Shoutdown time", "Enter time in seconds: ") Sleep($time * 1000) Resources UDF ResourcesEx UDF AutoIt Forum Search
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