Jump to content

Help with ie function


Recommended Posts

So every now and then, my internet either restarts or is disabled..

So some of my IE functions such as getting links from a web page end up returning a non-array variable.

I'm not sure how I should solve this, I was thinking something with IsArray, but it's already returned as one

Func GetLink($objIE, $Text = "")
    Local $oLinks, $link, $tURL, $pArray[1] = [0]

    $oLinks = _IELinkGetCollection($objIE)
    For $link In $oLinks

        $tURL = _FixNull($link.href)

        If InString($tURL, $Text, 2) = 1 Then
            _ArrayAdd($pArray, $tURL)
            $pArray[0] = UBound($pArray) - 1
        EndIf
    Next

    Return $pArray
EndFunc   ;==>GetLink

/e solved this

used UBound to count the # of entries.

Edited by igotandrew
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...