Jump to content

Search the Community

Showing results for tags '_ieframegetobjbyid'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. The following code is an adaptation of the IE.au3 UDF. By including this, you will be able to access Iframes and their content based on their ID's instead of their Names. As always, Critisism is welcome! Regards. Orrin Gradwell #include-once #include "WinAPIError.au3" ; #FUNCTION# ==================================================================================================================== ; Name...........: _IEFrameGetObjById ; Description ...: Returns an object reference to a Frame by ID ; Parameters ....: $o_object - Object variable of an InternetExplorer.Application, Window or Frame object ; $s_id - ID of the Frame you wish to match ; Return values .: On Success - Returns an object variable pointing to the Window object in a Frame, @EXTENDED = Frame count ; On Failure - Returns 0 and sets @ERROR ; @ERROR - 0 ($_IEStatus_Success) = No Error ; - 3 ($_IEStatus_InvalidDataType) = Invalid Data Type ; - 4 ($_IEStatus_InvalidObjectType) = Invalid Object Type ; - 7 ($_IEStatus_NoMatch) = No Match ; @Extended - Contains invalid parameter number ; Origional Author ........: Dale Hohm ; Adapted By ..............: Orrin Gradwell ; =============================================================================================================================== Func _IEFrameGetObjById(ByRef $o_object, $s_id) If Not IsObj($o_object) Then __IEErrorNotify("Error", "_IEFrameGetObjById", "$_IEStatus_InvalidDataType") Return SetError($_IEStatus_InvalidDataType, 1, 0) EndIf ; Local $oTemp, $oFrames If Not __IEIsObjType($o_object, "browserdom") Then __IEErrorNotify("Error", "_IEFrameGetObjById", "$_IEStatus_InvalidObjectType") Return SetError($_IEStatus_InvalidObjectType, 1, 0) EndIf If __IEIsObjType($o_object, "document") Then $oTemp = $o_object.parentWindow Else $oTemp = $o_object.document.parentWindow EndIf If _IEIsFrameSet($oTemp) Then $oFrames = _IETagNameGetCollection($oTemp, "frame") Else $oFrames = _IETagNameGetCollection($oTemp, "iframe") EndIf If $oFrames.length Then For $oFrame In $oFrames If $oFrame.id = $s_id Then Return SetError($_IEStatus_Success, 0, $oTemp.frames($s_id)) Next __IEErrorNotify("Warning", "_IEFrameGetObjById", "$_IEStatus_NoMatch", "No frames matching Id") Return SetError($_IEStatus_NoMatch, 2, 0) Else __IEErrorNotify("Warning", "_IEFrameGetObjById", "$_IEStatus_NoMatch", "No Frames found") Return SetError($_IEStatus_NoMatch, 2, 0) EndIf EndFunc ;==>_IEFrameGetObjById
×
×
  • Create New...