Jump to content

manipulating IE 'tags'...?

Recommended Posts



  Here are a couple of code snippets relating to the '_IETagNameGetCollection'  command that I found in some other posts:

Func download ()
Local $innerText 
Local $tags = _IETagNameGetCollection($oIE, "select")

For $tag in $tags
    $innerText = $tag.GetAttribute("Console_Widget_Nm")
    If $innerText = "RMD_Division" Then
       _IEFormElementOptionSelect($tag, "L")
    ElseIf $innerText = "Status_Type" Then
       _IEFormElementOptionSelect($tag, "Active Only")



Local $sCNumber = "C Number", $iCNumber = "0"
Local $oIE = _IECreate("https://www.w3schools.com/html/html_tables.asp", 1)
Local $oTds = _IETagNameGetCollection($oIE, "td")
For $oTd In $oTds
    If $oTd.InnerText = $sCNumber Then
        $iCNumber = $oTd.NextElementSibling.InnerText
MsgBox(32, $sCNumber, $sCNumber & " : " & $iCNumber)


As can be seen both of these snippets make usage of the '_IETagNameGetCollection' command.  In each snippet the variable is then read in a loop to extract the needed information (i.e. $innerText = $tag.GetAttribute("Console_Widget_Nm") AND $oTd.InnerText = $sCNumber respectively). 

My question is how do I know how to reference the object(s) when using the '_IETagNameGetCollection' command?  I mean how can I know what the 'GetAttribute' and 'innerText' and '$oTd.NextElementSibling.InnerText' properties are doing...?  Is there a list available in documentation someplace giving the potential properties available that can be used to manipulate the 'Tag Collection'...?

Also when the '_IETagNameGetCollection' command is used how is the data returned...?  The AutoIT documentation for the command is a bit confusing...it seems to indicate the results are returned in an array however i'm not sure.  For example if I use 'Local $oTds = _IETagNameGetCollection($oIE, "div")' and there are 173 'div' elements on a page...are they returned as  $oTds[0], $oTds[1], ...$oTds[172]   ?  I'd like them to be in an array for easy access and processing.  Thanks in advance for any insights.  I'm just trying to better understand this command (and _IE functions in general).

Share this post

Link to post
Share on other sites


  Thanks for the references.   :)  

Share this post

Link to post
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