Jump to content

Reasume in 1 function?


eracross
 Share

Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...