Dranka Posted November 21, 2019 Share Posted November 21, 2019 Hello, I've some forms to fill on a website but unfortunately 2 forms has been copied pasted by the developper so they have the exact same id and value and so on ... I admit autoit is ready the html code line by line so he's filling the first form but he's skipping the second one. Is there a way to skip the first form or to fill both while they have same id ? Here is the html code : <form id="form_jeu" action="/jeu/verif_jeu.php" method="post" enctype="multipart/form-data"> <p align="center"><input class="input obg" name="code_jeu" id="code_jeu" type="text" onkeyup="verifPseudo444(this)" placeholder="Entrer le code"/> <input type="hidden" name="id" value="444"/> <input type="hidden" name="doubs" value="1"/> <input type="hidden" name="jura" value="1"/> <input type="hidden" name="id_user" value="19123"/> <br/> <input type="submit" name="valider_code" id="valider_code" value="valider le code"/></p> </form> <form id="form_jeu" action="/jeu/verif_jeu.php" method="post" enctype="multipart/form-data"> <p align="center"><input class="input obg" name="code_jeu" id="code_jeu" type="text" onkeyup="verifPseudo449(this)" placeholder="Entrer le code"/> <input type="hidden" name="id" value="449"/> <input type="hidden" name="doubs" value="1"/> <input type="hidden" name="jura" value="1"/> <input type="hidden" name="id_user" value="19123"/> <br/> <input type="submit" name="valider_code" id="valider_code" value="valider le code"/></p> </form> Here is my script expandcollapse popup#include <ie.au3> ;Declare Variables============================================= $URL="random url" $code_jeu="random code" $codejeu="code_jeu" ;=============================================================== Func _Fill_Name_Code() $oForm = _IEGetObjById($oIE, "form_jeu") ;you need this to declare the form you want to fill. the form ID is form1 as you can see in the html code $oCode = _IEFormElementGetObjByName($oForm, $codejeu) _IEFormElementSetValue($oCode, $code_jeu) EndFunc Func _Click_Upload() $oButtons = _IETagnameGetCollection($oIE, "input") For $oButton in $oButtons If String($oButton.value) = "valider le code" Then _IEAction($oButton, "click") ExitLoop EndIf Next EndFunc While 1 Do $oIE = _IECreate($Url,0,1,1,0) Until IsObj($oIE) _Fill_Name_Code() ;We call the Func _IELoadWait($oIE,500000) _IEQuit($oIE) WEnd Thank you Link to comment Share on other sites More sharing options...
Nine Posted November 21, 2019 Share Posted November 21, 2019 I suggest you read forum rules. Especially the part about game automation, as it appears this is what you are trying to do... “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Dranka Posted November 21, 2019 Author Share Posted November 21, 2019 Let me delete it then Link to comment Share on other sites More sharing options...
Nine Posted November 21, 2019 Share Posted November 21, 2019 You can't delete it. Mods will lock it later. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Developers Jos Posted November 21, 2019 Developers Share Posted November 21, 2019 Welcome to the AutoIt forum. Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. The Moderation team SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts