Jump to content
Sign in to follow this  
Ranger08

HTML Format?

Recommended Posts

Ranger08

The section below is suppose to go to a website and grab/visit url links. But I don't get what format the links should be in, the original coder made it 2-3 years ago and said he forgot so he couldn't give me any support...

Its just a blank page by the way, hope someone could help me in figuring this out :graduated:

#Region Link functions
 
Func _IELinkClickByText(ByRef $O_OBJECT, $S_LINKTEXT, $I_INDEX = 0, $F_WAIT = 1)
    If Not IsObj($O_OBJECT) Then
        __IEERRORNOTIFY("Error", "_IELinkClickByText", "$_IEStatus_InvalidDataType")
        SetError($_IESTATUS_INVALIDDATATYPE, 1)
        Return 0
    EndIf
    Local $FOUND = 0, $LINK, $LINKTEXT, $LINKS = $O_OBJECT.document.links
    $I_INDEX = Number($I_INDEX)
    For $LINK In $LINKS
        $LINKTEXT = $LINK.outerText & ""
        If $LINKTEXT = $S_LINKTEXT Then
            If ($FOUND = $I_INDEX) Then
                $LINK.click
                If $F_WAIT Then
                    _IELoadWait($O_OBJECT)
                    SetError(@error)
                    Return -1
                EndIf
                SetError($_IESTATUS_SUCCESS)
                Return -1
            EndIf
            $FOUND = $FOUND + 1
        EndIf
    Next
    __IEERRORNOTIFY("Warning", "_IELinkClickByText", "$_IEStatus_NoMatch")
    SetError($_IESTATUS_NOMATCH)
    Return 0
EndFunc

Thank you

Edited by Ranger08

Share this post


Link to post
Share on other sites
JohnOne

That is a function which is part of the standard IE.au3 UDFs that come along with Autoit3 installation.

IE functions are still very much supported here by Dale Hohm, the author of the above function.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.