Sign in to follow this  
Followers 0
offtopic

IE problem

4 posts in this topic

Hello, might i enquire how i would go about clicking or submiting this submit button with the IE functions. I do not have access to name or id.

   

<input type="submit" class="input_submit" value="Post" />

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

I have not tested this, but this may work.

;Global $go_Submit = _IEGetObjByClass($oIE, "input_submit", "submit", "Post")

Func _IEGetObjByClass(ByRef $o_obj, $s_class, $s_type = "", $s_value = "")

    If Not IsObj($o_obj) Then
        Return SetError(1, 0, 0)
    EndIf

    Local $o_items = _IETagNameAllGetCollection($o_obj)
    If Not IsObj($o_items) Then
        Return SetError(2, 0, 0)
    EndIf

    For $o_item In $o_items
        If String(Execute("$o_item.classname")) <> $s_class Then
            ContinueLoop
        EndIf

        If StringLen($s_type) Then
            If String(Execute("$o_item.type")) <> $s_type Then
                ContinueLoop
            EndIf
        EndIf

        If StringLen($s_value) Then
            If String(Execute("$o_item.value")) <> $s_value Then
                ContinueLoop
            EndIf
        EndIf

        Return $o_item
    Next

    Return SetError(3, 0, 0)
EndFunc
Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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  
Followers 0