找回密码
 加入
搜索
查看: 2153|回复: 7

怎么判断某进程 连续5分钟不存在 发出通知

  [复制链接]
发表于 2009-12-20 12:33:53 | 显示全部楼层 |阅读模式
本帖最后由 qq82015930 于 2009-12-21 13:00 编辑

怎么判断某进程 连续5分钟不存在 发出通知

谢谢,学习拉
.我是用来监视主机上的软件的,要是不在线就自动发飞信通知到手机上.
发表于 2009-12-20 12:38:24 | 显示全部楼层
一直监控?
发表于 2009-12-20 12:38:30 | 显示全部楼层
本帖最后由 afan 于 2009-12-20 13:24 编辑
Dim $p = "notepad.exe", $t = TimerInit()
While Not ProcessExists($p)
        If TimerDiff($t) > 5 * 60 * 1000 Then ExitLoop (MsgBox(0, "例子", "5分钟内记事本没运行."))
        Sleep(10)
WEnd
发表于 2009-12-20 12:48:22 | 显示全部楼层
Local $sProcess = "QQ.exe", $iTimer = TimerInit(), $fExist = 0

Do
        $fExist = ProcessExists($sProcess)
        If $fExist Then ExitLoop
        Sleep(4)
Until        TimerDiff($iTimer) > (5 * 60 * 1000)

If $fExist = 0 Then Msgbox(0, "", $sProcess & " not exists.")
发表于 2009-12-20 13:22:20 | 显示全部楼层
dim $pid="qq.exe",$timer=timerinit()
AdlibRegister ( "fivem"  )

while 1
sleep(100)
wend

func fivem()
if timerdiff($timer)>=5*60*1000 and not ProcessExists($pid) then
traytip("tip","no qq",5)
$timer=timerinit()
endif
endfunc
发表于 2011-3-27 21:33:58 | 显示全部楼层
不错 不错 好好学习
发表于 2011-4-19 20:04:03 | 显示全部楼层
我只是想用用而已
发表于 2011-4-28 08:24:14 | 显示全部楼层
gooooooooooooood. thanks!!!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-10-2 06:40 , Processed in 0.093367 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表