joakim 4 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? Share this post Link to post Share on other sites
Juvigy 49 Posted April 28, 2011 This line is screwing you: $oIE =_IELoadWait($oIE) Change it to : _IELoadWait($oIE) Share this post Link to post Share on other sites
joakim 4 Posted April 28, 2011 Thank you, that worked perfect. Share this post Link to post Share on other sites