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

Monitor newly started processes

$
0
0

As the title says, I'd like to get informed when a new process starts. Here's my current code, but I've got no idea why it isn't working. Theoritically it should work.

AutoIt         
#include <Array.au3> $base = ProcessList() $open = FileOpen(@ScriptDir & "\ProcLog.log", 1) $Size = UBound($base) - 1 $new = 0 While 1     $proc = ProcessList()     $procS = UBound($base) - 1     For $i = 1 To UBound($procS) - 1         _ArraySearch($base, $proc[$i][1])         If @error Then             FileWrite($open, ">>> New process: " & $proc[$i][0]  & @crlf)             MsgBox(0,"", "new process!", 1)             $new += 1         EndIf         If $i = UBound($procS) - 1 & $new > 0 Then             $base = ProcessList()             $Size = UBound($base) - 1             $new = 0         EndIf     Next WEnd

Viewing all articles
Browse latest Browse all 12506

Trending Articles



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