Jump to content

Form Submit


Recommended Posts

Hey there, I was wondering why I can't submit this form using IE.au3

Starts with:

<form name="register" method="post">

Ends with :

<input type="submit" name="register" value="Register">

I'm using this to submit it

_IEFormSubmit($o_form, 0)

But after it puts in the data I want and goes to submit it clears all the data and doesn't sumbit. :)

Link to comment
Share on other sites

Try

$oObj_IEGetObjByName($oIE,"register")
_IEAction($oObj,"click")

I just tried that, this time it didn't even submit or clear what data it entered.

Summary:

Trying the first way I posted = Everything got cleared

Trying the way you just posted = Nothing happens at all :)

Link to comment
Share on other sites

I just tried that, this time it didn't even submit or clear what data it entered.

Summary:

Trying the first way I posted = Everything got cleared

Trying the way you just posted = Nothing happens at all :)

I misread something, try this

$oObj=_IEGetObjByName($oIE,"register")
_IEFormSubmit($oObj,0)
Edited by Generator
Link to comment
Share on other sites

Try my loop below and get the collection of form and then use FormSubmit along with FormGetCollection

Change the url and the txt to vertifiy with, now is Input.

#include<IE.au3>
$thread="http://virusscan.jotti.org/"
$Time=5000

_ForumReply($thread,$Time)

Func _ForumReply($ThreadLink,$oTimeout)
    Local $oIE,$oForm,$oQuery,$o_Query
    _IEErrorHandlerRegister()
    _IELoadWaitTimeout($oTimeout)
    $oIE=_IECreate($ThreadLink,0,1,1)
    MsgBox(64,"Warning","Input text into element and click ok to continue")
    $oForm = _IEFormGetCollection ($oIE)
    $iNumForm=@extended
    For $i=0 to $iNumForm-1
        $oForm = _IEFormGetCollection ($oIE, $i)
        $oQuery = _IEFormElementGetCollection ($oForm)
        $iNumElement=@extended
        For $n=0 to $iNumElement-1
            $o_Query=_IEFormElementGetCollection($oForm,$n)
            If String(_IEFormElementGetValue($o_Query))="Input" Then
                MsgBox(64,"Form: "&$i,"Element: "&$n)
                ExitLoop
            EndIf
        Next
    Next
EndFunc
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...