找回密码
 加入
搜索
查看: 1751|回复: 1

[IE类操作] iFrame无法获取INPUT对象的问题

[复制链接]
发表于 2015-4-2 16:40:46 | 显示全部楼层 |阅读模式
本帖最后由 heavenm 于 2015-4-2 16:47 编辑
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#PRE_Res_requestedExecutionLevel=None
#PRE_Tidy_Stop_OnError=n
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <IE.au3>
;https://msdn.microsoft.com/en-us/library/ie/ms536439(v=vs.85).aspx
$OIE = _IEAttach('http://post.58.com/79/111/', 'url')
$oFrame1 = _IEFrameGetCollection($oIE, 0)
$oFrame2 = _IEFrameGetCollection($oFrame1, 0)

MsgBox(0, IsObj($oFrame2),  _IEPropertyGet($oFrame2, "classname"))

Exit


Func _IETagGetCollection($__Object, $__TagName, $__Pattern = '', $__Mode = 0, $__Exclude = -1)
        If Not IsObj($__Object) Then Return SetError(1, 0, 0)
        Local $__IETagIndeX, $__TEMP,$__sTEMP

        $__IETagIndeX = _IETagNameGetCollection($__Object, $__TagName);获取链接集合
        For $__TEMP In $__IETagIndeX
                If $__Exclude <> -1 And StringRegExp($__TEMP.outerhtml, $__Exclude) Then ContinueLoop
                Select
                        Case $__Mode == 0
                                If StringRegExp($__TEMP.outertext, $__Pattern) Then Return SetError(0, 0, $__TEMP)
                        Case $__Mode == 1
                                $__sTEMP=StringRegExp($__TEMP.outerhtml, '<.*?>',1)
                                If StringRegExp($__sTEMP[0], $__Pattern) Then Return SetError(0, 0, $__TEMP)
                        Case Else
                                Return SetError('你确定输入的参数是数字?', 0, 1) ; Could be caused by parameter 2, 3 or both
                EndSelect
        Next
        Return SetError(0, 0, '无匹配')
EndFunc   ;==>_IETagGetCollection
 楼主| 发表于 2015-4-2 16:45:18 | 显示全部楼层
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-5 12:11 , Processed in 0.071839 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表