joakim Posted April 28, 2011 Posted April 28, 2011 I am trying to list the number of tags (in this particular case "ul") in a pagesource. It works fine if not used in a loop, so for instance this code works; $oIE = _IEAttach("http://www.XXX/browse2?&CAR_MODEL/MAKE=3233","url") $oInputs = _IETagNameGetCollection ($oIE, "ul") MsgBox(0,"NUmber of tags","$oInputs: " & @extended) But when moved inside a loop it only detects 1 tag, regardless of what type of tag I'm trying to identify. The list inside the variable $used_make is severely shortened here. But it is good enough for the reproduction of the error. $used_make = "CAR_MODEL/MAKE=3233,CAR_MODEL/MAKE=6733" $split = StringSplit($used_make, ",", 1) For $i = 1 To $split[0] $url = "http://www.XXX/browse2?&" & $split[$i] $oIE = _IECreate($url) $oIE = _IELoadWait($oIE) $oInputs = _IETagNameGetCollection ($oIE, "ul") MsgBox(0,"NUmber of tags","$oInputs: " & @extended) _IEQuit($oIE) Next Any ideas?
Juvigy Posted April 28, 2011 Posted April 28, 2011 This line is screwing you: $oIE =_IELoadWait($oIE) Change it to : _IELoadWait($oIE)
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