Jump to content

(IE) how to submit


Recommended Posts

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!

Link to comment
Share on other sites

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 by shike0123
Link to comment
Share on other sites

 

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...