shike0123 Posted July 1, 2013 Posted July 1, 2013 Hi All, I'm newbie and hope someone help for my problem. I write a scrip autologin a website. Website have 3 submit like this <form action="" method="post"> <input type="hidden" name="web_id" value="0"/> <tr><td>H1Site</td><td>15</td><td><button name="submit" value="submit" class="ui-button button1" ><span class="button-left"><span class="button-right">Log Now!</span></span></button></td> </tr> </form> <form action="" method="post"> <input type="hidden" name="web_id" value="1"/> <tr><td>H2Site</td><td>8</td><td><button name="submit" value="submit" class="ui-button button1" ><span class="button-left"><span class="button-right">Log Now!</span></span></button></td> </tr> </form> <form action="" method="post"> <input type="hidden" name="web_id" value="2"/> <tr><td> H3Site </td><td>8</td><td><button name="submit" value="submit" class="ui-button button1" ><span class="button-left"><span class="button-right">Log Now!</span></span></button></td> </tr> </form></table> I use this $oSubmit = _IEGetObjByName($oIE, "submit") _IEAction($oSubmit, "click") _IELoadWait($oIE) to submit button 1, and I don't know how to submit difrent button or how to submit button 2 fist Thanks any help!
DW1 Posted July 1, 2013 Posted July 1, 2013 (edited) The third parameter in _IEGetObjByName() is the index, so you may choose them based on occurrence. $oSubmit = _IEGetObjByName($oIE, "submit", 1) ;index 1 is the 2nd one found (0 based index) _IEAction($oSubmit, "click") _IELoadWait($oIE) Edited July 1, 2013 by danwilli shike0123 1 AutoIt3 Online Help
shike0123 Posted July 3, 2013 Author Posted July 3, 2013 (edited) This is my scrip to fake ip. I test and it doesn't work. Please help me! $soip=2 $oIE=ObjCreate ("InternetExplorer.Application") fip() $oIE=ObjCreate ("InternetExplorer.Application") Func fip() $oExcel = _ExcelBookOpen(@ScriptDir & "\proxy.xls",1) ;open file excel to take data of proxy $ip=_ExcelReadCell($oExcel, $soip,2) ;take ip $port=_ExcelReadCell($oExcel, $soip,3) ;take port HttpSetProxy(2, $ip&':'&$port) FtpSetProxy(2, $ip&':'&$port) $soip=$soip+1 $oIE.Quit _ExcelBookClose($oExcel) EndFunc Edited July 3, 2013 by shike0123
shike0123 Posted July 5, 2013 Author Posted July 5, 2013 The third parameter in _IEGetObjByName() is the index, so you may choose them based on occurrence. $oSubmit = _IEGetObjByName($oIE, "submit", 1) ;index 1 is the 2nd one found (0 based index) _IEAction($oSubmit, "click") _IELoadWait($oIE) Thanks you! And can you help me another q? This is my scrip to fake ip. I test and it doesn't work. Please help me! $soip=2 $oIE=ObjCreate ("InternetExplorer.Application") fip() $oIE=ObjCreate ("InternetExplorer.Application") Func fip() $oExcel = _ExcelBookOpen(@ScriptDir & "\proxy.xls",1) ;open file excel to take data of proxy $ip=_ExcelReadCell($oExcel, $soip,2) ;take ip $port=_ExcelReadCell($oExcel, $soip,3) ;take port HttpSetProxy(2, $ip&':'&$port) FtpSetProxy(2, $ip&':'&$port) $soip=$soip+1 $oIE.Quit _ExcelBookClose($oExcel) EndFunc
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