各位版主老大帮我把这段代码改一下。用hao123.com打开让它不出现新窗口
本帖最后由 yang3114 于 2010-11-1 17:08 编辑#include <IE.au3>
_IEErrorHandlerRegister()
Global $oIE = _IECreateEmbedded()
$url = "http://www.hao123.com"
GUICreate("test", 700, 600, (@DesktopWidth - 700) / 2, (@DesktopHeight - 600) / 2)
GUICtrlCreateObj($oIE, 0, 0, 700, 600)
_IENavigate($oIE, $url)
_replace()
GUISetState()
Do
$nurl = _IEPropertyGet($oIE, "locationurl")
If $nurl <> $url Then
_replace()
$url = $nurl
EndIf
Sleep(10)
Until GUIGetMsg() = -3
Func _replace()
Local $body, $string
_IELoadWait($oIE)
$body = _IEBodyReadHTML($oIE)
$string = StringRegExpReplace($body, '\btarget=_blank', 'target=_self')
$string = StringRegExpReplace($string, '\btarget="_blank"', 'target=_self')
_IEBodyWriteHTML($oIE, $string)
EndFunc ;==>_replace 等待风行者,快点出现吧 求版主进来帮我改一下。 这个问题没人能够解决吗,论坛里的高手呢。
页:
[1]