Jump to content

How to create new functions at UDFs?


 Share

Recommended Posts

Hi guys, i am working with Mozilla and chrome udf and since i can't find these two functions i need:

_IEFrameGetCollection
_IETagNameGetCollection

I thought i can create them myself at the udf source codes or i dont know..

can anyone tell me the path where to go so i can create these functions that exist for internet explorer but not for mozilla, chrome or other browsers.....

Link to comment
Share on other sites

Func _IETagNameGetCollection(ByRef $oObject, $sTagName, $iIndex = -1)
    If Not IsObj($oObject) Then
        __IEConsoleWriteError("Error", "_IETagNameGetCollection", "$_IESTATUS_InvalidDataType")
        Return SetError($_IESTATUS_InvalidDataType, 1, 0)
    EndIf
    ;
    If Not __IEIsObjType($oObject, "browserdom") Then
        __IEConsoleWriteError("Error", "_IETagNameGetCollection", "$_IESTATUS_InvalidObjectType")
        Return SetError($_IESTATUS_InvalidObjectType, 1, 0)
    EndIf

    Local $oTemp
    If __IEIsObjType($oObject, "documentcontainer") Then
        $oTemp = _IEDocGetObj($oObject)
    Else
        $oTemp = $oObject
    EndIf

    $iIndex = Number($iIndex)
    Select
        Case $iIndex = -1
            Return SetError($_IESTATUS_Success, $oTemp.GetElementsByTagName($sTagName).length, _
                    $oTemp.GetElementsByTagName($sTagName))
        Case $iIndex > -1 And $iIndex < $oTemp.GetElementsByTagName($sTagName).length
            Return SetError($_IESTATUS_Success, $oTemp.GetElementsByTagName($sTagName).length, _
                    $oTemp.GetElementsByTagName($sTagName).item($iIndex))
        Case $iIndex < -1
            __IEConsoleWriteError("Error", "_IETagNameGetCollection", "$_IESTATUS_InvalidValue", "$iIndex < -1")
            Return SetError($_IESTATUS_InvalidValue, 3, 0)
        Case Else
            __IEConsoleWriteError("Error", "_IETagNameGetCollection", "$_IESTATUS_NoMatch")
            Return SetError($_IESTATUS_NoMatch, 0, 0) ; Could be caused by parameter 2, 3 or both
    EndSelect
EndFunc   ;==>_IETagNameGetCollection

You would have to use objects with Internet Explorer then you maybe could create them. How to do this can often be really hard search around maybe someone got a IE UDF with the Functions you are seeking for ;3
Thats what i found in IE.au3 Include~

Func _IEFrameGetCollection(ByRef $oObject, $iIndex = -1)
    If Not IsObj($oObject) Then
        __IEConsoleWriteError("Error", "_IEFrameGetCollection", "$_IESTATUS_InvalidDataType")
        Return SetError($_IESTATUS_InvalidDataType, 1, 0)
    EndIf
    ;
    $iIndex = Number($iIndex)
    Select
        Case $iIndex = -1
            Return SetError($_IESTATUS_Success, $oObject.document.parentwindow.frames.length, _
                    $oObject.document.parentwindow.frames)
        Case $iIndex > -1 And $iIndex < $oObject.document.parentwindow.frames.length
            Return SetError($_IESTATUS_Success, $oObject.document.parentwindow.frames.length, _
                    $oObject.document.parentwindow.frames.item($iIndex))
        Case $iIndex < -1
            __IEConsoleWriteError("Error", "_IEFrameGetCollection", "$_IESTATUS_InvalidValue", "$iIndex < -1")
            Return SetError($_IESTATUS_InvalidValue, 2, 0)
        Case Else
            __IEConsoleWriteError("Warning", "_IEFrameGetCollection", "$_IESTATUS_NoMatch")
            Return SetError($_IESTATUS_NoMatch, 2, 0)
    EndSelect
EndFunc   ;==>_IEFrameGetCollection

I hope that was helpfull ;3

Edited by RaiNote
Codes
  • C++/AutoIt/OpenGL Easy Coder
  • I will be Kind to you and try to help you
  • till what you want isn't against the Forum
  • Rules~

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...