Sign in to follow this  
Followers 0
Sparrowlord

Form Submit

8 posts in this topic

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. :)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Try

$oObj=_IEGetObjByName($oIE,"register")
_IEAction($oObj,"click")
Edited by Generator

Share this post


Link to post
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 :)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

The same thing happened as my original this time, the form just clears all the data.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

The same thing happened as my original this time, the form just clears all the data.

PMed you a working solution. Tested.

Share this post


Link to post
Share on other sites

Thanks Generator its working really well.. :)

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