#include <GUIConstants.au3>
#include <IE.au3>
GUICreate("Test", 875, 400)
$oIE = _IECreateEmbedded ()
$GUIX = GUICtrlCreateObj($oIE, 0, 20, 875, 250)
_IENavigate ($oIE, "")
GUISetState(@SW_SHOW)
$Url = 'http://www.qq.com/'
$oHTTP = ObjCreate('microsoft.xmlhttp')
$oHTTP.Open('get', $Url, False)
$oHTTP.Send()
$str = BinaryToString($oHTTP.responseBody)
Local $Test = StringRegExp($str, '<!--今日话题-->((?s).+)<!--今日话题 end-->', 3)
_IEDocWriteHTML ($oIE, $Test[0])
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE ;==>退出事件
Exit
EndSelect
WEnd
|