关闭所有可见窗口程序
极域有个好用的功能,关闭所有程序但我现在喜欢用凌波,凌波没有这个功能,所以用au3写了个小程序。
论坛程序老了传不了附件,上代码
#include <MsgBoxConstants.au3>
Example()
Func Example()
; Retrieve a list of window handles.
$aExplorer = ProcessList("explorer.exe")
Local $aList = WinList()
; Loop through the array displaying only visable windows with a title.
For $i = 1 To $aList
If $aList[$i] <> "" And BitAND(WinGetState($aList[$i]), 2) Then
$killID = WinGetProcess($aList[$i])
$KK = 1
For $j = 1 To $aExplorer
If $aExplorer[$j] = $killID Then
$KK = 0
;MsgBox(1,$aList[$i],"")
;If Not StringInStr($aList[$i],"Program Manager") Then WinClose($aList[$i])
ExitLoop
EndIf
Next
If $KK = 0 Then
If StringInStr($aList[$i], "Program Manager") Or StringInStr($aList[$i], "开始") Then ContinueLoop
EndIf
WinClose($aList[$i])
EndIf
Next
Local $aList = WinList()
; Loop through the array displaying only visable windows with a title.
For $i = 1 To $aList
If $aList[$i] <> "" And BitAND(WinGetState($aList[$i]), 2) Then
$killID = WinGetProcess($aList[$i])
$KK = 1
For $j = 1 To $aExplorer
If $aExplorer[$j] = $killID Then
$KK = 0
;MsgBox(1,$aList[$i],"")
;If Not StringInStr($aList[$i],"Program Manager") Then WinClose($aList[$i])
ExitLoop
EndIf
Next
If $KK Then ProcessClose($killID)
EndIf
Next
EndFunc ;==>Example 感谢分享 感谢楼主分享 真香! 怎么使用?能编译一下吗?放在蓝奏网盘也行的 现在只用极域,凌波是偶尔被这帮人逃离极域时重启他们机器的手段,不让他们知道凌波的存在。
页:
[1]