lomey 发表于 2011-9-13 14:27:24

关闭两个网页的问题

想做一个关闭两个开机弹出的网页广告,第一个开机就弹出来,另外一个要等一会再弹出来。如何将以下代码修改呢?
#Include <WinAPIEx.au3>
Dim $e = 0

;获取 QQ.exe PID
Dim $PubWinPID = ProcessExists("QQ.exe")

While($e <= 1)
        ;历遍进程获取 "iexplore.exe" PID
        $list = ProcessList("iexplore.exe")

For $i = 1 To $list
       
        ;获取父进程PID
        Dim $FuPID = _WinAPI_GetParentProcess ($list[$i])
       
        ;判断父进程PID是否与"iexplore.exe" 父进程PID相同
        If($FuPID = $PubWinPID)Then
                ;关闭父进程PID相同的"iexplore.exe"进程
                ProcessClose($list[$i])
        EndIf
Next
WEnd

lomey 发表于 2011-9-15 13:50:11

{:face (229):} 求指教
页: [1]
查看完整版本: 关闭两个网页的问题