Jump to content
Sign in to follow this  
Sparrowlord

Form Submit

Recommended Posts

Sparrowlord

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
Generator

Try

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

Share this post


Link to post
Share on other sites
Sparrowlord

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
Generator

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
Sparrowlord

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
Generator

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
Generator

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
Sparrowlord

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  

×

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.