JReinn Posted November 3, 2008 Share Posted November 3, 2008 I need a code, for a bot, that can turn your computer off, at a certain time. Like I bought this game once, and it ended downloading around 1 AM in the morning, and I needed to get up early, but I stayed up, because I don't want my computer on all night. So you can set the bot up, so you write hour in one textbox, and minutes in the other. You click start bot (or press a certain button, like F5 or something, and the bot starts). When the time becomes what you wrote (System time), the bot will shut down the computer. Any fast help greatly appreciated. Link to comment Share on other sites More sharing options...
Developers Jos Posted November 3, 2008 Developers Share Posted November 3, 2008 Any fast help greatly appreciated.You are kidding ...right ? Did you bother to search or open the helpfile? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
JReinn Posted November 3, 2008 Author Share Posted November 3, 2008 You are kidding ...right ? Did you bother to search or open the helpfile?Yes, I did. Link to comment Share on other sites More sharing options...
Developers Jos Posted November 3, 2008 Developers Share Posted November 3, 2008 Yes, I did...and ? found anything ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
JReinn Posted November 3, 2008 Author Share Posted November 3, 2008 ..and ? found anything ?Nope, that's why I posted here. Link to comment Share on other sites More sharing options...
Developers Jos Posted November 3, 2008 Developers Share Posted November 3, 2008 (edited) Nope, that's why I posted here.I am sorry but I simply do not believe you put ANY real effort in it for the simple fact that when you specify shutdown in the index AND search of the helpfile you will get hits for the required command.Now if you are wondering why I refuse to help directly is because I do not like people coming here and ask for fast replies, that is in general an indication of a young impatient person.Jos Edited November 3, 2008 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
James Posted November 3, 2008 Share Posted November 3, 2008 Well this should work: #include <GUIConstants.au3> Global $wHour, $wMins, $isCounting = False AdlibEnable("GetTime", 1000) $hGui = GUICreate("Shutdown Bot", 297, 44, 307, 303) GUICtrlCreateLabel("Hours:", 8, 8, 43, 17) $mHour = GUICtrlCreateInput("", 56, 8, 49, 21) GUICtrlCreateLabel("Mins:", 120, 8, 29, 17) $mMins = GUICtrlCreateInput("", 152, 8, 57, 21) $Start = GUICtrlCreateButton("Start", 216, 8, 75, 25, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Start $rHour = GUICtrlRead($mHour) $rMins = GUICtrlRead($mMins) $isCounting = True; We're counting! While $isCounting = True If $wHour = $rHour And $wMins = $rMins Then Shutdown(1); Shutdown EndIf WEnd EndSwitch WEnd Func GetTime() $wHour = @HOUR $wMins = @MIN EndFunc Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Developers Jos Posted November 3, 2008 Developers Share Posted November 3, 2008 Well this should work: .... eikel SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
James Posted November 3, 2008 Share Posted November 3, 2008 (edited) Say what? "Jerk" - Thanks... I posted after you did! Edited November 3, 2008 by JamesBrooks Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
JReinn Posted November 3, 2008 Author Share Posted November 3, 2008 I am sorry but I simply do not believe you put ANY real effort in it for the simple fact that when you specify shutdown in the index AND search of the helpfile you will get hits for the required command. Now if you are wondering why I refuse to help directly is because I do not like people coming here and ask for fast replies, that is in general an indication of a young impatient person. Jos I have put some effort in searching, and I'm sorry I said "Fast response", but I really needed this. Well this should work: #include <GUIConstants.au3> Global $wHour, $wMins, $isCounting = False AdlibEnable("GetTime", 1000) $hGui = GUICreate("Shutdown Bot", 297, 44, 307, 303) GUICtrlCreateLabel("Hours:", 8, 8, 43, 17) $mHour = GUICtrlCreateInput("", 56, 8, 49, 21) GUICtrlCreateLabel("Mins:", 120, 8, 29, 17) $mMins = GUICtrlCreateInput("", 152, 8, 57, 21) $Start = GUICtrlCreateButton("Start", 216, 8, 75, 25, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Start $rHour = GUICtrlRead($mHour) $rMins = GUICtrlRead($mMins) $isCounting = True; We're counting! While $isCounting = True If $wHour = $rHour And $wMins = $rMins Then Shutdown(1); Shutdown EndIf WEnd EndSwitch WEnd Func GetTime() $wHour = @HOUR $wMins = @MIN EndFunc Thanks for the code! You are the best. Link to comment Share on other sites More sharing options...
Developers Jos Posted November 3, 2008 Developers Share Posted November 3, 2008 Say what?"Jerk" - Thanks... I posted after you did!Close You simple spoinled the whole point I was trying to make ... so I should be entitled to call you something ... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
James Posted November 3, 2008 Share Posted November 3, 2008 Close You simple spoinled the whole point I was trying to make ... so I should be entitled to call you something ... Well I didn't mean to "spoinled" your point, you posted while I was posting my response. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Developers Jos Posted November 3, 2008 Developers Share Posted November 3, 2008 Well I didn't mean to "spoinled" your point, you posted while I was posting my response. yea yea .... i know, I am a bad speller ... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
James Posted November 3, 2008 Share Posted November 3, 2008 yea yea .... i know, I am a bad speller ...Your Dutch, I forgive you! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
JReinn Posted November 3, 2008 Author Share Posted November 3, 2008 Could it be able to make a countdown timer (Tooltip text) that shows, when the computer turns off with hours, minutes & seconds? Link to comment Share on other sites More sharing options...
James Posted November 3, 2008 Share Posted November 3, 2008 I'm sure you could do that. Create a label and every second start counting down. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
JReinn Posted November 3, 2008 Author Share Posted November 3, 2008 I'm sure you could do that. Create a label and every second start counting down.I'm new to AutoIt... The code would be, like??? I don't understand you completely :/ Link to comment Share on other sites More sharing options...
James Posted November 3, 2008 Share Posted November 3, 2008 Look at, GuiCtrlCreateLabel and GuiCtrlSetData. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Bert Posted November 3, 2008 Share Posted November 3, 2008 I wonder if a better way to do this is simply look for the download to be done, then shutdown. What if the download hangs... Oh, what are you on? dialup? or is the thing you are downloading a movie? The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
JReinn Posted November 3, 2008 Author Share Posted November 3, 2008 I wonder if a better way to do this is simply look for the download to be done, then shutdown. What if the download hangs...Oh, what are you on? dialup? or is the thing you are downloading a movie?I download a game, from ea manager... Link to comment Share on other sites More sharing options...
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