Internet explorer autoit未随机点击IE嵌入式版本

Internet explorer autoit未随机点击IE嵌入式版本,internet-explorer,autoit,Internet Explorer,Autoit,我想要的是创建IE嵌入式版本,打开mysite.com并打开随机链接 #include <IE.au3> #include <GUIConstantsEx.au3> $width = 800 $height = 600 $hMain=GUICreate("TEST",800,600,@DesktopWidth/2-$width/2,@DesktopHeight/2-$height/2) $oIE = ObjCreate("Shell.Explorer.2") $GUIAc

我想要的是创建IE嵌入式版本,打开mysite.com并打开随机链接

#include <IE.au3>
#include <GUIConstantsEx.au3>
$width = 800
$height = 600
$hMain=GUICreate("TEST",800,600,@DesktopWidth/2-$width/2,@DesktopHeight/2-$height/2)
$oIE = ObjCreate("Shell.Explorer.2")
$GUIActiveX = GUICtrlCreateObj ($oIE, 0, 0, $width+3, $height+2)
$oIE.navigate("www.mysite.com")
Local $oLinks = _IELinkGetCollection($oIE)
Local $iNumLinks = @extended
$oIE._IELinkClickByIndex($oIE, Random(0, $iNumLinks -1))
GUISetState()
While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
    WinSetTitle($hMain,"",_IEPropertyGet($oIE, "title"))
WEnd
因此,需要帮助才能使其在IE嵌入式版本上也能正常工作

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>

_IEErrorHandlerRegister()

$width = 800
$height = 600

Local $oIE = _IECreateEmbedded()
$hMain=GUICreate("TEST",800,600,@DesktopWidth/2-$width/2,@DesktopHeight/2-$height/2, _
        $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN)
GUICtrlCreateObj($oIE, 0, 0, $width+3, $height+20)

GUISetState() ;Show GUI

_IENavigate($oIE, "www.mysite.com")

Local $oLinks = _IELinkGetCollection($oIE)
Local $iNumLinks = @extended
_IELinkClickByIndex($oIE, Random(0, $iNumLinks -1))
GUISetState()
While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
    WinSetTitle($hMain,"",_IEPropertyGet($oIE, "title"))
WEnd

好的,我明白了,为什么HTML5不玩!!嵌入式IE是v7:问题已解决…:regkey条目:到底是什么问题?如果人们不必比较两个脚本来找出差异,那么这将非常有用。
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>

_IEErrorHandlerRegister()

$width = 800
$height = 600

Local $oIE = _IECreateEmbedded()
$hMain=GUICreate("TEST",800,600,@DesktopWidth/2-$width/2,@DesktopHeight/2-$height/2, _
        $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN)
GUICtrlCreateObj($oIE, 0, 0, $width+3, $height+20)

GUISetState() ;Show GUI

_IENavigate($oIE, "www.mysite.com")

Local $oLinks = _IELinkGetCollection($oIE)
Local $iNumLinks = @extended
_IELinkClickByIndex($oIE, Random(0, $iNumLinks -1))
GUISetState()
While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
    WinSetTitle($hMain,"",_IEPropertyGet($oIE, "title"))
WEnd