autoit3 ie.au3 函数之——_IECreateEmbedded

_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()

效果图:




  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
BluetoothConstants.au3是一个AutoIt v3包含文件,它包含Bluetooth COM对象所需的常量。如果您想要在AutoIt v3中使用蓝牙COM对象,您需要手动添加此包含文件。 以下是BluetoothConstants.au3的示例代码: ``` ; Bluetooth设备发现模式 Global Const $BluetoothDiscoverableMode_None = 0 Global Const $BluetoothDiscoverableMode_General = 1 Global Const $BluetoothDiscoverableMode_Limited = 2 ; Bluetooth设备发现状态 Global Const $BluetoothDiscoverableMode_Inquiry = 0 Global Const $BluetoothDiscoverableMode_Pairing = 1 Global Const $BluetoothDiscoverableMode_Connecting = 2 Global Const $BluetoothDiscoverableMode_Removing = 3 Global Const $BluetoothDiscoverableMode_InquiryComplete = 4 Global Const $BluetoothDiscoverableMode_PairingComplete = 5 Global Const $BluetoothDiscoverableMode_DeviceAuthenticated = 6 Global Const $BluetoothDiscoverableMode_DeviceUnauthenticated = 7 Global Const $BluetoothDiscoverableMode_ServiceConnected = 8 Global Const $BluetoothDiscoverableMode_ServiceDisconnected = 9 ; Bluetooth设备类型 Global Const $BluetoothDeviceType_Unknown = 0 Global Const $BluetoothDeviceType_Classic = 1 Global Const $BluetoothDeviceType_LE = 2 Global Const $BluetoothDeviceType_DualMode = 3 ; Bluetooth设备状态 Global Const $BluetoothDeviceState_NotPresent = 0 Global Const $BluetoothDeviceState_Present = 1 Global Const $BluetoothDeviceState_Paired = 2 Global Const $BluetoothDeviceState_Connected = 3 Global Const $BluetoothDeviceState_Disconnected = 4 ; Bluetooth服务类型 Global Const $BluetoothServiceType_None = 0 Global Const $BluetoothServiceType_Rfcomm = 1 ; Bluetooth错误代码 Global Const $BluetoothError_Success = 0 Global Const $BluetoothError_InvalidParameter = 1 Global Const $BluetoothError_NotInitialized = 2 Global Const $BluetoothError_NotEnabled = 3 Global Const $BluetoothError_NoResources = 4 Global Const $BluetoothError_InProgress = 5 Global Const $BluetoothError_NotSupported = 6 Global Const $BluetoothError_RemoteDeviceNotAvailable = 7 Global Const $BluetoothError_OtherError = 8 ``` 将以上代码保存到一个名为BluetoothConstants.au3的文件中,并将其放置在您的AutoIt v3脚本所在的文件夹中即可使用。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值