RobertK Posted October 12, 2007 Share Posted October 12, 2007 (edited) Hi all, I've found this code in the example section: #include <IE.au3> $sBrin = "" $sPass = "" $sURL = "http://www.klassetv.nl/" $oIE = _IECreate($sURL) $oForm = _IEFormGetObjByName($oIE, "") $oBrin = _IEFormElementGetObjByName($oForm, "school_loginnaam") $oPassword = _IEFormElementGetObjByName($oForm, "school_wachtwoord") $oButton = _IEGetObjByName($oForm, "") _IEFormElementSetValue($oBrin, $sBrin) _IEFormElementSetValue($oPassword, $sPass) _IEAction($oButton, "click") The site uses this form: <form method="post" style="margin: 0px; padding: 0px;"> <input name="type" type="hidden" value="schoolaanmelding" /> <input name="action" type="hidden" value="inloggen" /> <img alt="inloggen" src="/images/inloggen_label.gif" /> <span><input class="footer_input" name="school_loginnaam" onfocus="if(this.value == 'brin') this.value = '';" onblur="if(this.value == '') this.value = 'brin';" type="text" value="brin" /></span> <span><input class="footer_input" name="school_wachtwoord" onfocus="if(this.value == 'wachtwoord') this.value = '';" onblur="if(this.value == '') this.value = 'wachtwoord';" type="password" value="wachtwoord" /></span> <input class="footer_button" src="/images/login_button.gif" type="image" /> </form> As you can see, this form has no name tag defined and there is no submit button but an image (also without name). I've looked all over the place, but since a name tag is part of the W3 standards (if I'm correct) nearly all sites have it. If you can tell me how I can fill out this form, and perform the login automaticly please help me. (ps sorry for the dutch text, but it's a dutch site on which there should be logged on) //Robert K. Edited October 12, 2007 by RobertK [font="Verdana"]I've gone to find myself. If I get back before I return, please keep me here.[/font] Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 12, 2007 Share Posted October 12, 2007 Look at the examples in the help file under _IEFormGetCollection(). By default it returns a collection of all forms, but you can give it a 0-based index to a specific form, for example _IEFormGetCollection($oIE, 2) returns the third form. If you don't know which form, or it changes on a dynamic page, get the collection and loop through them looking for the attribute/tag/text/etc. that will identify what you are looking for. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
RobertK Posted October 12, 2007 Author Share Posted October 12, 2007 Look at the examples in the help file under _IEFormGetCollection(). By default it returns a collection of all forms, but you can give it a 0-based index to a specific form, for example _IEFormGetCollection($oIE, 2) returns the third form.If you don't know which form, or it changes on a dynamic page, get the collection and loop through them looking for the attribute/tag/text/etc. that will identify what you are looking for. thnx man it works great, found that you can submit a form with _IEFormSubmit($oForm) [font="Verdana"]I've gone to find myself. If I get back before I return, please keep me here.[/font] 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