本帖最后由 shqf 于 2013-3-1 16:22 编辑
你不肯上代码,那我上。你再试试,窗口中浏览的网页变了,读出的网页源码是不是也变了。#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
_IEErrorHandlerRegister()
Local $oIE = _IECreateEmbedded()
GUICreate("Embedded Web control Test", 640, 580, _
(@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _
$WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN)
GUICtrlCreateObj($oIE, 10, 10, 620, 500)
Local $GUI_Button_ReadHTML = GUICtrlCreateButton("ReadHTML", 280, 520, 100, 30)
GUISetState() ;显示GUI
_IENavigate($oIE, "http://www.autoitx.com/")
; 等待用户关闭窗口
While 1
Local $msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $GUI_Button_ReadHTML
MsgBox(0,_IEPropertyGet($oIE,"locationURL"),_IEDocReadHTML($oIE))
EndSelect
WEnd
GUIDelete()
Exit
|