autoit3 ie.au3 函数之——_IEAttach
来源:互联网 发布:淘宝能申请信用卡吗 编辑:程序博客网 时间:2024/06/08 11:19
_IEAttach: Attach to the specified instance of Internet Explorer where the search string sub-string matches (based on the selected mode).
即: 查找第一个存在的符合查找字串子串的IE例子,查找方式基于选择的模式
#include <IE.au3>
_IEAttach ( $s_string [, $s_mode = "Title" [, $i_instance = 1]] )
Parameters
$s_stringString to search for (for "embedded" or "dialogbox", use Title sub-string or HWND of window)$s_mode[optional] specifies search modeTitle = (Default) sub-string of main document title
WindowTitle = sub-string of full window title (instead of document title)
URL = sub-string or url of the current page
Text = sub-string in text from the body of the current page
HTML = sub-string in html from the body of the current page
HWND = hwnd of the browser window
Embedded = title sub-string or hwnd of of the window embedding the control
DialogBox = title sub-string or hwnd of modal/modeless dialogbox
Instance = $s_string is ignored, one browser reference returned (by matching instance number) from all available browser instances$i_instance[optional] 1-based index into group of browsers or embedded browsers matching $s_string and $s_mode. See Remarks.
例子: 首先开打一个网页,可以在后台运行,其title 包含"百度一下", 然后显示其URL
; *******************************************************
; Example 1 - Attach to a browser with "AutoIt" in its title, display the URL
; *******************************************************
;
#include <IE.au3>
$bai_du = _IECreate("www.baidu.com")
Sleep(500)
$oIE = _IEAttach ("百度一下")
MsgBox(0, "The URL", _IEPropertyGet ($oIE, "locationurl"))
例子:当一个页面打开时, 可以根据其页面text来查找
; *******************************************************
; Example 2 - Attach to a browser with "手机数码"
; in the text of it's top-level document
; *******************************************************
;
#include <IE.au3>
$360_buy = _IECreate("www.360buy.com")
Sleep(500)
$oIE = _IEAttach ("手机数码", "text")
MsgBox(0, "The URL", _IEPropertyGet ($oIE, "locationurl"))
- autoit3 ie.au3 函数之——_IEAttach
- autoit3 ie.au3 函数之——_IE_Example、_IE_Introduction
- autoit3 ie.au3 函数之——_IE_VersionInfo
- autoit3 ie.au3 函数之——_IEAction
- autoit3 ie.au3 函数之——_IEGetObjById、_IEGetObjByName
- autoit3 ie.au3 函数之——_IEBodyReadHTML、_IEBodyWriteHTML
- autoit3 ie.au3 函数之——_IEBodyReadText
- autoit3 ie.au3 函数之——_IECreate
- autoit3 ie.au3 函数之——_IECreateEmbedded
- 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日志
- select poll模式简单分析
- javamail常用类
- Oracle SQL Developer 使用简要说明
- oracle实例内存(SGA和PGA)调整
- 普通程序员、文艺程序员和2B程序员的区别
- autoit3 ie.au3 函数之——_IEAttach
- 4G TF卡精简安装Ubuntu
- Endianness
- android 蓝牙各种UUID
- ICE的整体架构
- linux 动态库和静态库
- 转载一篇文章,这几天有相关问题要处理,学习一下先
- Oracle写出性能优良的SQL语句
- CRegKey 注册表操作