Sparrowlord Posted December 5, 2007 Share Posted December 5, 2007 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 More sharing options...
Generator Posted December 5, 2007 Share Posted December 5, 2007 (edited) Try $oObj=_IEGetObjByName($oIE,"register") _IEAction($oObj,"click") Edited December 5, 2007 by Generator Link to comment Share on other sites More sharing options...
Sparrowlord Posted December 5, 2007 Author Share Posted December 5, 2007 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 More sharing options...
Generator Posted December 5, 2007 Share Posted December 5, 2007 (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 December 5, 2007 by Generator Link to comment Share on other sites More sharing options...
Sparrowlord Posted December 5, 2007 Author Share Posted December 5, 2007 The same thing happened as my original this time, the form just clears all the data. Link to comment Share on other sites More sharing options...
Generator Posted December 5, 2007 Share Posted December 5, 2007 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 More sharing options...
Generator Posted December 5, 2007 Share Posted December 5, 2007 The same thing happened as my original this time, the form just clears all the data.PMed you a working solution. Tested. Link to comment Share on other sites More sharing options...
Sparrowlord Posted December 5, 2007 Author Share Posted December 5, 2007 Thanks Generator its working really well.. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now