Champak Posted May 20, 2008 Posted May 20, 2008 Is the index suppose to return the position/instance of the tag I'm looking for? Ex. if I want the innertext of the 2nd "h2" that appears in the web page aren't I suppose to do: $oElements = _IETagNameGetCollection ($oIE, "h2", 2) For $oElement In $oElements ConsoleWrite( "!=String: " & $oElement.innertext & @CRLF & @CRLF) Next When I take away the 2 in the getcollection, it returns all the innertext from all of the h2s. Or am I misunderstanding the index parameter?
Moderators SmOke_N Posted May 20, 2008 Moderators Posted May 20, 2008 (edited) It's zero based. _IETagNameGetCollection ($oIE, "h2", 1) Would return the 2nd index. Edit: Example:#include <IE.au3> $oIE = _IE_Example ("form") $oInputs = _IETagNameGetCollection ($oIE, "input", 1) MsgBox(0, "Form Input Type", "Form: " & $oInputs.form.name & " Type: " & $oInputs.type) Edited May 20, 2008 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
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