本帖最后由 kyniel 于 2011-12-26 15:46 编辑 #include <IE.au3>
$window = WinWait("[ClASS:TXGuiFoundation;Title:(聊天对话框标题)]","")
$oIE = _IEAttach($window, "embedded", 1);如果是获取群记录的话改成$oIE = _IEAttach($window, "embedded", 2)
If IsObj($oIE) Then
$oElements = _IETagNameGetCollection ($oIE,"div")
For $oElement In $oElements
If $oElement.classname="msgContentDiv" And $oElement.classname<>"0" Then
MsgBox(0, "元素信息", "标记名: " & $oElement.classname & @CR & "内部文本: " & StringRegExpReplace($oElement.innerText,"0","纯图片"))
EndIf
Next
EndIf
Exit
这是获取聊天记录的代码,记得要把消息记录展开。 |