jvanegmond Posted February 19, 2006 Posted February 19, 2006 (edited) Shuts PC down after a given amount of seconds. If input is 0 will shut down immediately, if cancel or close is pressed cancel shutdown procedure. Dim $answer $answer = InputBox ( "Shutdown", "Please type the amount of seconds you want the pc to wait before shutting down ( leave 0 for immediately )" , "0" ) If $answer = "" Then Run("Shutdown -a") Else Run("Shutdown -s -t " & $answer) EndIf Not much code but a usefull thingy to leave on your desktop. Edit: Oops this should have go to Scripts and Scraps Edited February 19, 2006 by Manadar github.com/jvanegmond
Moderators SmOke_N Posted February 19, 2006 Moderators Posted February 19, 2006 Shuts PC down after a given amount of seconds. If input is 0 will shut down immediately, if cancel or close is pressed cancel shutdown procedure. Dim $answer $answer = InputBox ( "Shutdown", "Please type the amount of seconds you want the pc to wait before shutting down ( leave 0 for immediately )" , "0" ) If $answer = "" Then Run("Shutdown -a") Else Run("Shutdown -s -t " & $answer) EndIf Not much code but a usefull thingy to leave on your desktop. Edit: Oops this should have go to Scripts and Scraps Why wouldn't you just use ShutDown() commands in the help file? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
jvanegmond Posted February 19, 2006 Author Posted February 19, 2006 Well .. why wouldn't you, haha github.com/jvanegmond
cppman Posted February 19, 2006 Posted February 19, 2006 cuz its alot simpler to use 1 line instead of ten. but thats still cool.. Miva OS Project
Moderators SmOke_N Posted February 19, 2006 Moderators Posted February 19, 2006 Well .. why wouldn't you, hahaThat makes no sense. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
cppman Posted February 19, 2006 Posted February 19, 2006 That makes no sense.i think he/she meant "well... why would'nt u use my script". Miva OS Project
Valuater Posted February 19, 2006 Posted February 19, 2006 the timer on his shutdown seems to be a nice effect... i didn't notice that out ShutDown() has a timer... maybe it should and/or could 8)
Moderators SmOke_N Posted February 20, 2006 Moderators Posted February 20, 2006 the timer on his shutdown seems to be a nice effect...i didn't notice that out ShutDown() has a timer...maybe it should and/or could8)That would be a nice option I suppose if it worked like AdlibEnable()!! Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
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