Jump to content

How to keep a collection?


 Share

Recommended Posts

Hello and thanks in advance,

I ask regarding: _IELinkGetCollection

I red you loose a collection when you navegate (i.e. _IEAction ($oIE55, "back") but didn't find a sample or a workaround.

Therefore how could I having an initial page, to collect its links, to click on the first of them, and then go back to the next initial page to click on the next links?

Here is my code which is not getting the point because, as said, I loose the collection after the "back" navigation:

For $oLink In $oLinks

$sLinkText = _IEPropertyGet($oLink, "outerhtml")

if stringinstr($sLinkText,"link-one") then

_IEAction($oLink, "click")

$text66 = _IEBodyReadHTML($oFrame55)

If StringInStr($texto66,"Active") Then

msgbox(0,"","is active")

_IEAction ($oIE55, "back")

endif

elseif stringinstr($sLinkText,"link-two") then

(...)

Next

Please, make the answer as simple as possible ;-)

Regards

Link to comment
Share on other sites

Hello and thanks in advance,

I ask regarding: _IELinkGetCollection

I red you loose a collection when you navegate (i.e. _IEAction ($oIE55, "back") but didn't find a sample or a workaround.

Therefore how could I having an initial page, to collect its links, to click on the first of them, and then go back to the next initial page to click on the next links?

Here is my code which is not getting the point because, as said, I loose the collection after the "back" navigation:

For $oLink In $oLinks

$sLinkText = _IEPropertyGet($oLink, "outerhtml")

if stringinstr($sLinkText,"link-one") then

_IEAction($oLink, "click")

$text66 = _IEBodyReadHTML($oFrame55)

If StringInStr($texto66,"Active") Then

msgbox(0,"","is active")

_IEAction ($oIE55, "back")

endif

elseif stringinstr($sLinkText,"link-two") then

(...)

Next

Please, make the answer as simple as possible ;-)

Regards

Walk the collection through with For/In/Next and create a separate list of links (i.e. $oLink.href), and anything else you need before you navigate away.

;)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...