#include <WinAPIEx.au3>
Local $aAW = WinList('[CLASS:TXGuiFoundation]')
Local $aCW, $aCP, $i, $CFlag = 0, $sInfo = ''
For $i = 1 To $aAW[0][0]
$aCW = _WinAPI_EnumChildWindows($aAW[$i][1], 0)
If @error Then ContinueLoop
If $aCW[0][0] = 4 Or $aCW[0][0] = 9 Then
$sInfo &= '句柄:' & $aAW[$i][1] & ' 群组窗口 : "' & $aAW[$i][0] & '"' & @CRLF
$CFlag += 1
ElseIf $aCW[0][0] = 1 Or $aCW[0][0] = 6 Then
$aCP = ControlGetPos($aAW[$i][1], '', 'ATL:30A4D1D81')
If @error Then ContinueLoop
If $aCP[3] = 0 Or $aCP[3] = 16 Then
$sInfo &= '句柄:' & $aAW[$i][1] & ' 聊天窗口 : "' & $aAW[$i][0] & '"' & @CRLF
$CFlag += 1
ElseIf $aCP[3] = 15 Then
$sInfo &= '句柄:' & $aAW[$i][1] & ' 讨论组窗口: "' & $aAW[$i][0] & '"' & @CRLF
$CFlag += 1
EndIf
EndIf
Next
If Not $CFlag Then
MsgBox(48, '问题', '没 TM 窗口')
Else
MsgBox(64, '检索到 ' & $CFlag & ' 个TM窗口', $sInfo)
EndIf
|