Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

kill task help.

$
0
0
im having a hard time trying to get this to work inside a loop. i can get it to work fine all by itself but then it seems to stop working inside the loop :(

#cs ----------------------------------------------------------------------------
The point of this is to stop the Agent.exe process from running when d3 is started then idle untill it is detected again
#ce ----------------------------------------------------------------------------
Global $process = "Agent.exe", $PID=0, $delay = 5000, $x=0
_check()
Func setloop()
While $x <> 1
  Sleep($delay)
  _check()
WEnd
EndFunc
Func _check()
If ProcessExists($process) = 0 Then
  setloop()
ElseIf ProcessExists($process) = 1 Then
  ProcessWaitClose($process)
EndIf
EndFunc


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>