sanye000001 发表于 2010-10-26 19:49:26

计算关闭了多少个iexplore.exe进程怎么写

计算关闭了多少个iexplore.exe进程怎么写?
自己写的$a=0
$ie=ProcessExists("iexplore.exe")
If $ie Then
Do
        ProcessClose("iexplore.exe")
        $a=$a+1
Until Not ProcessExists("iexplore.exe")
EndIf
MsgBox(0,"a的值是多少?",$a)这段代码被管理员强烈谴责,请教想实现这个功能的代码要怎么写才可以。谢谢

pusofalse 发表于 2010-10-26 19:57:36

$aProcess = ProcessList("iexplore.exe")

For $i = 1 To $aProcess
      If Not ProcessClose($aProcess[$i]) Then $aProcess -= 1
Next

MsgBox(0, "", $aProcess)

sanye000001 发表于 2010-10-26 20:24:54

回复 2# pusofalse $aProcess = ProcessList("iexplore.exe")
$k=0
For $i = 1 To $aProcess
      If ProcessClose($aProcess[$i]) Then $k+= 1
Next

MsgBox(0, "", $k)非常感谢

pusofalse 发表于 2010-10-26 21:00:28

回复 3# sanye000001


    为何要多加一个变量k呢?变量k在这段代码里表示什么意思?

zhongzijie 发表于 2010-10-26 22:21:57

谢谢pusofalse 分享

mybkc 发表于 2010-10-26 22:49:07

学习了!!!

lpxx 发表于 2010-10-26 23:30:06


pusofalse 发表于 2010-10-26 19:57 http://www.autoitx.com/images/common/back.gif

身体是革命的本钱,没有身体那里来的精力研究更多的东西?

sanye000001 发表于 2010-10-27 12:03:53

回复 4# pusofalse


    计算关闭了多少个iexplore.exe进程啊。
页: [1]
查看完整版本: 计算关闭了多少个iexplore.exe进程怎么写