autoit3 ie.au3 函数之——_IECreateEmbedded
来源:互联网 发布:网络新媒介 编辑:程序博客网 时间:2024/06/14 11:24
_IECreateEmbedded : Create a Webbrowser object suitable for embedding in an AutoIt GUI with GuiCtrlCreateObj().
即: 创建一个web浏览器对象适合于嵌入一个GuiCtrlCreateObj()生成的AutoIt GUI
#include <IE.au3>
_IECreateEmbedded ( )
例子:
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
_IEErrorHandlerRegister () ; 注册一个用户COM出错处理器并且使其起作用
$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, "http://www.baidu.com")
; 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, "http://www.baidu.com")
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()
效果图:
- autoit3 ie.au3 函数之——_IECreateEmbedded
- autoit3 ie.au3 函数之——_IE_Example、_IE_Introduction
- autoit3 ie.au3 函数之——_IE_VersionInfo
- autoit3 ie.au3 函数之——_IEAction
- autoit3 ie.au3 函数之——_IEGetObjById、_IEGetObjByName
- autoit3 ie.au3 函数之——_IEAttach
- autoit3 ie.au3 函数之——_IEBodyReadHTML、_IEBodyWriteHTML
- autoit3 ie.au3 函数之——_IEBodyReadText
- autoit3 ie.au3 函数之——_IECreate
- autoit3 ie.au3 函数之——_IEDocGetObj
- autoit3 ie.au3 函数之——_IEDocInsertHTML
- autoit3 ie.au3 函数之——_IEDocWriteHTML
- autoit3 ie.au3 函数之——_IEErrorHandlerDeRegister & _IEErrorHandlerRegister
- autoit3 ie.au3 函数之——_IEErrorNotify
- autoit3 ie.au3 函数之——_IEFormElementCheckBoxSelect & _IEFormGetObjByName
- autoit3 ie.au3 函数之——_IEFormElementGetCollection & _IEFormGetCollection
- autoit3 ie.au3 函数之——ControlClick
- autoit3 ie.au3 函数之——_FileWriteLog日志
- Context-Sensitive Help Provider in Wpf
- 同步/异步、阻塞/非阻塞的理解
- C++ 中 位拷贝与值拷贝的区别
- HSI、HSV、RGB、CMY、CMYK、HSL、HSB、Ycc、XYZ、Lab、YUV颜色模型(转)
- 贝塔分布B(p,q)和伽马函数T(p),T(q),T(p+q)关系证明
- autoit3 ie.au3 函数之——_IECreateEmbedded
- Asp.net中“无法启动程序 http://localhost/.../Default.aspx”
- Android图形系统的分析与移植--一、Android GUI系统简介
- Kevin Rose创立新公司Milk,或对硅谷发展产生重大影响
- Android NDK编译带STL的 C/C++ 程序
- C#实现窗体的F1赛车V1.0
- 带参数的游标
- Android图形系统的分析与移植 -- 二、Android显示系统软件架构分析
- centos5.1下编译Linux内核