Burgs Posted April 11, 2018 Posted April 11, 2018 Hello, 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") EndIf Next EndFunc also: Local $sCNumber = "C Number", $iCNumber = "0" Local $oIE = _IECreate("https://www.w3schools.com/html/html_tables.asp", 1) _IELoadWait($oIE) Local $oTds = _IETagNameGetCollection($oIE, "td") For $oTd In $oTds If $oTd.InnerText = $sCNumber Then $iCNumber = $oTd.NextElementSibling.InnerText ExitLoop EndIf Next 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).
Subz Posted April 11, 2018 Posted April 11, 2018 Look at Microsoft for IE Dom, you can also search for attributes here: https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now