qwee Posted May 29, 2009 Share Posted May 29, 2009 Need help with this. What command should I use for this? The processes that I need to shutdown after 30 minutes is: mspaint.exe Game.exe Then it'll wait ~5 minutes and will start mspaint.exe again. I saw a "waiting code" yesterday, but can't find it now :/ Link to comment Share on other sites More sharing options...
qwee Posted May 29, 2009 Author Share Posted May 29, 2009 Need help with this. What command should I use for this?The processes that I need to shutdown after 30 minutes is:mspaint.exeGame.exeThen it'll wait ~5 minutes and will start mspaint.exe again.I saw a "waiting code" yesterday, but can't find it now :/Fixed close now. Just need starting (: Link to comment Share on other sites More sharing options...
JSThePatriot Posted May 29, 2009 Share Posted May 29, 2009 Look up the following functions. I am surprised these weren't easy to find in the helpfile. Sleep(), ProcessExists(), ProcessClose(), Run(), ShellExecute() If you can't get it from there, then maybe you should try some of the tutorials that are stickied at the top of this forum. I hope this helps boost your journey, Jarvis AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
qwee Posted May 29, 2009 Author Share Posted May 29, 2009 Look up the following functions. I am surprised these weren't easy to find in the helpfile. Sleep(), ProcessExists(), ProcessClose(), Run(), ShellExecute() Link to comment Share on other sites More sharing options...
GEOSoft Posted May 29, 2009 Share Posted May 29, 2009 (edited) You could also use something like this $Time = TimerInit() $sApp_1 = "mspaint.exe" $sApp_2 = "game.exe" While TimerDiff($Time) < 180000 Sleep(100) Wend If ProcessExists($sApp_1) Then ProcessClose($sApp_1) If ProcessExists($sApp_2) Then ProcessClose($sApp_2) $iRestart = @Min +5 If $iRestart >= 60 Then $iRestart -= 60 While 1 Sleep(1000) If @Min = $iRestart Then ExitLoop Wend ShellExecute($sApp_1) Edit: Syntax correction. Edited May 29, 2009 by GEOSoft George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" 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