那可能是你的网太慢了加载网站时间久~~你可以试着多等会或是先加载gui后再打开网站~~代码如下#include <IE.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
Opt("GUIOnEventMode", 1)
Dim $url = "",$url1 = ""
_IEErrorHandlerRegister()
$oIE = _IECreateEmbedded()
$url = "http://www.tao123.com/?3528_6595"
$gui=GUICreate("test", 700, 600, -1, -1, BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_MAXIMIZE, $WS_SIZEBOX))
GUISetOnEvent($GUI_EVENT_CLOSE, "_DeleteWin")
$AX = GUICtrlCreateObj($oIE, 0, 0, @DesktopWidth, @DesktopHeight - 35)
GUISetState()
_IENavigate($oIE, $url)
_self()
While 1
If $oIE.readyState <> 4 Then _self()
$oi = _IEAttach($gui, "Embedded")
$url = _IEPropertyGet($oi, "locationurl")
If $url1="" Then $url1=$url
If $url1<>$url Then
MsgBox(0,"有变动","原网址:"&$url1&@CR&"改变为:"&$url )
Exit
EndIf
ToolTip($url&@CR&$url1, 0, 0)
WEnd
Func _self()
GUICtrlSetState($AX, $GUI_HIDE)
_IELoadWait($oIE)
$As = _IETagNameGetCollection($oIE, "a")
For $A In $As
$A.target = "_self"
Next
$Forms = _IEFormGetCollection($oIE)
For $Form In $Forms
$Form.target = "_self"
Next
$Frames = _IEFrameGetCollection($oIE)
If $Frames <> 0 Then
For $Frame In $Frames
$As = _IETagNameGetCollection($Frame, "a")
For $A In $As
$A.target = "_self"
Next
Next
EndIf
GUICtrlSetState($AX, $GUI_SHOW)
EndFunc ;==>_self
Func _DeleteWin()
Exit
EndFunc ;==>_DeleteWin
|