想做一个监控进程的谁能给个代码
我想做一个监控进程的程序~要进程结束就发个邮件~偶这类代码吗? #include <Process.au3>#include <INet.au3>
ProcessClose("notepad.exe")
$PID = ProcessExists("notepad.exe") ; 返回记事本程序的 PID,若未发现该进程则返回值为 0。
If $PID Then ProcessClose($PID)
$Address = InputBox('Address', 'Enter the E-Mail address to send message to')
$Subject = InputBox('Subject', 'Enter a subject for the E-Mail')
$Body = InputBox('Body', 'Enter the body (message) of the E-Mail')
MsgBox(0,'E-Mail has been opened','The E-Mail has been opened and process identifier for the E-Mail client is ' & _INetMail($address, $subject, $body)) If ProcessExists("notepad.exe") Then
MsgBox(0, "示例", "记事本运行中。")
EndIf 那进程被终止后怎么发邮件呢 ?? 要进程结束就发个邮件
你究竟是要结束进程就先要发邮件
还是结束进程就发送邮件啊??? 呵呵,楼上问的是 看出来楼主的意思了,楼主是想搞个软件检测指定进程,如果该进程结束了就向设定的邮箱发邮件通知。
页:
[1]