eracross 0 Posted September 22, 2011 Hi guys can be this reasume in one function only or in a loop??If not ProcessExists("process.exe") Then Run(@scriptdir&"\process.exe") endif if Not ProcessExists("process1.exe") Then If ProcessExists("process.exe") Then Run(@scriptdir&"\process1.exe") endif endif if Not ProcessExists("process2.exe") Then If ProcessExists("process1.exe") Then Run(@scriptdir&"\process2.exe") endif endif What i want is if the process already exits run the another process..etc Thanks Share this post Link to post Share on other sites
JoHanatCent 13 Posted September 22, 2011 No reason not to exist in a While loop? HotKeySet("{ESC}", "Terminate");Press esc key to end the loop While 1 If Not ProcessExists("process.exe") Then Run(@ScriptDir & "\process.exe") EndIf If Not ProcessExists("process1.exe") Then If ProcessExists("process.exe") Then Run(@ScriptDir & "\process1.exe") EndIf EndIf If Not ProcessExists("process2.exe") Then If ProcessExists("process1.exe") Then Run(@ScriptDir & "\process2.exe") EndIf EndIf WEnd Sleep(17) Func Terminate() Exit 0 EndFunc ;==>Terminate Share this post Link to post Share on other sites