dos123 发表于 2008-10-31 15:48:03

[已解决]关于IECreateEmbedded ()

本帖最后由 dos123 于 2011-5-19 23:10 编辑

我用IECreateEmbedded ()创建一个ie的控件后
打开一个网页,应该怎么样才能让打开的网页直接定位到需要显示的地方
下边的是例子,他打开是直接定位在账号输入那,我想修改成定位在身份证那。
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>

_IEErrorHandlerRegister ()

$oIE = _IECreateEmbedded ()
GUICreate("Embedded Web control Test", 640, 580, _
                (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _
                $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN)
$GUIActiveX = GUICtrlCreateObj($oIE, 10, 40, 600, 360)
$GUI_Button_Back = GUICtrlCreateButton("Back", 10, 420, 100, 30)
$GUI_Button_Forward = GUICtrlCreateButton("Forward", 120, 420, 100, 30)
$GUI_Button_Home = GUICtrlCreateButton("Home", 230, 420, 100, 30)
$GUI_Button_Stop = GUICtrlCreateButton("Stop", 340, 420, 100, 30)

GUISetState()       ;Show GUI

_IENavigate ($oIE, "https://vip.ztgame.com:8081/registe/register.jsp")

; Waiting for user to close the window
While 1
        $msg = GUIGetMsg()
        Select
                Case $msg = $GUI_EVENT_CLOSE
                        ExitLoop
                Case $msg = $GUI_Button_Home
                        _IENavigate ($oIE, "https://vip.ztgame.com:8081/registe/register.jsp")
                Case $msg = $GUI_Button_Back
                        _IEAction ($oIE, "back")
                Case $msg = $GUI_Button_Forward
                        _IEAction ($oIE, "forward")
                Case $msg = $GUI_Button_Stop
                        _IEAction ($oIE, "stop")
        EndSelect
WEnd

GUIDelete()

Exit

liongodmien 发表于 2008-11-1 11:36:51

你查下面两个函数的用法!:
GUICtrlCreateObj($oIE, 10, 40, 600, 360)
_IENavigate ($oIE, "https://vip.ztgame.com:8081/registe/register.jsp")
页: [1]
查看完整版本: [已解决]关于IECreateEmbedded ()