以下是从我的代码中截出来的一段 $aWindows = _WinAPI_EnumWindows()
For $i = 1 To UBound($aWindows) - 1
$Style = _WinAPI_GetWindowLong($aWindows[$i][0], -16)
$ExStyle = _WinAPI_GetWindowLong($aWindows[$i][0], -20)
Switch @OSVersion
Case "WIN_2000", "WIN_XP", "WIN_2003"
If $aWindows[$i][1] = "#32770" And $Style = 0x94C008C4 And $ExStyle = 0x00010101 Then ;未通过 WHQL 徽标验证时弹出的 警告窗口
WinActivate($aWindows[$i][0])
Send("!{c}")
EndIf
If $aWindows[$i][1] = "#32770" And $Style = 0x94C000C4 And $ExStyle = 0x00010101 Then ;找到新硬件 窗口
WinClose($aWindows[$i][0])
EndIf
;Case "WIN_2008"
;Case "WIN_2008R2"
;Case "WIN_VISTA"
;Case "WIN_7"
; If $aWindows[$i][1] = "Notepad" And $Style = 0x14CF0000 And $ExStyle = 0x000100C8 Then
; WinActivate($aWindows[$i][0])
; Send("!{F4}")
; EndIf
EndSwitch
|