本帖最后由 gzh888666 于 2012-6-13 21:45 编辑 #include <Inet.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#include <WinAPI.au3>
$Form1 = GUICreate("例子",770, 570, 200,200)
GUICtrlSetState(-1, $GUI_CHECKED)
Global $oIE = _IECreateEmbedded()
Global $GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, 770, 570)
GUISwitch($Form1)
GUISetState(@SW_SHOW)
$IE = "http://www.baidu.com"
_IENavigate($oIE, $IE)
$YS = _INetGetSource($IE)
Local $Test = StringRegExp($YS, '"(\S+?)">搜索风云榜', 3)
MsgBox(0,"搜索风云榜","字符串为:"&$Test[0])
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
Exit
|