Jump to content

[Solved] Reverse IE object collection


Recommended Posts

Hi community

Is there a way to reverse an IE object collection ?

I have such code and I know my good occurence is at very bottom of the collection

I would like to spare timer by searching from the end

$oDiv_Collection = _IETagNameGetCollection ( $oIE, "div" )
$Index = 0
For $oDiv In $oDiv_Collection
    If $bFlag == True And $oDiv.getAttribute ( "class" ) == "form-group ng-scope ng-isolate-scope" Then ExitLoop
    If $oDiv.getAttribute ( "id" ) == "renseignement" Then $bFlag = True
    $Index += 1
Next

Regards

Edited by Nicolas57
Link to post
Share on other sites

Yes like this :

Local $colButtons = _IETagNameGetCollection($oIE, "button")
  MsgBox($MB_SYSTEMMODAL, "", $colButtons.length & "/" & @error)
  Local $oButton
  For $i = $colButtons.length-1 to 0 Step -1
    $oButton = $colButtons.item($i)
    MsgBox($MB_SYSTEMMODAL, "", $oButton.GetAttribute("class") & "/" & $oButton.innerText)
    ConsoleWrite ($oButton.className & @CRLF)
  Next

 

Link to post
Share on other sites
  • Nicolas57 changed the title to [Solved] Reverse IE object collection

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...