Nbanonimous Posted April 15, 2009 Posted April 15, 2009 hey guys this is wut i have so far i want it to wait in the background to always check if the process, "server.exe" is running and if it ISNT running, I want it to Run server.exe! sounds simple, but I'm new with AutoIT Sleep(1) Local $var = 1 ; $var is a string while ($var = 1) if (ProcessExists ("server.exe") then $var = 1 Else $var = 2 WEnd sleep (1) Run ("server.exe") Best Free Undetectable Proxies!www.CPUMod.netwww.CellFoneTrader.comwww.TindoraFarms.com
NELyon Posted April 15, 2009 Posted April 15, 2009 While 1 If Not ProcessExists("server.exe") Then Run("server.exe") EndIf Sleep(200) WEnd
Nbanonimous Posted April 15, 2009 Author Posted April 15, 2009 Thanks, but does this always stay on? or after server.exe crashes and this program re-starts it, this program ends? Best Free Undetectable Proxies!www.CPUMod.netwww.CellFoneTrader.comwww.TindoraFarms.com
sambalec Posted April 15, 2009 Posted April 15, 2009 (edited) while 1 = infinite loop Launch the script and try to kill server.exe process Edited April 15, 2009 by sambalec
sambalec Posted April 15, 2009 Posted April 15, 2009 (edited) Bug with 'If not ProcessExists' Try this : While 1 If ProcessExists("server.exe") Then ;; Else Run("server.exe") Sleep(500) Endif Wend Edited April 15, 2009 by sambalec
sambalec Posted April 15, 2009 Posted April 15, 2009 (edited) My brain's buggin... sorry just tired when i tried it. KentonBomb's code is the best Edited April 15, 2009 by sambalec
Cynagen Posted April 15, 2009 Posted April 15, 2009 Bug with 'If not ProcessExists' Try this : While 1 If ProcessExists("server.exe") Then ;; Else Run("server.exe") Sleep(500) Endif WendoÝ÷ Ûú®¢×½éìjez¶®¶sevÆR¢b&ö6W74W7G2gV÷C·6W'fW"æWRgV÷C²ÒFVâ'VâgV÷C·6W'fW"æWRgV÷C²¢6ÆVWS¥vVæ@ ProcessExists returns 0 if the process does not exist since there is no PID. Blah, blah, blah... lip service... lip service.Working on a number of projects right now, just waiting for my time to post them here on AutoIt forums.
Nbanonimous Posted April 17, 2009 Author Posted April 17, 2009 awesome, when i get home i'll test this, thanks!! btw, i love autoit sooo much Best Free Undetectable Proxies!www.CPUMod.netwww.CellFoneTrader.comwww.TindoraFarms.com
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