Jump to content

Recommended Posts

Posted

ok i need some help to click a button on a webpage.

the pages source looks like this:

<form method='post' action='bank.php'>
bla
bla
bla
<tr><td class="box_content" colspan="2"><div align="center"><input type="submit" size="25" name="deposit_all" value="Deposit All" /><input size="25" type="submit" name="withdraw_all" value="Withdraw All" /></div></td></tr>
</table></form></div>

i need the script to click on deposit all. The form has no name, so the _IEFormGetObjByName gives error, no image on the button to use _IEImgClick or _IEFormImageClick and link clicking doesn't work, as there isn't a real link there (statusbar not showing :()

HELP! Thanks for any ideas :shocked:

  • Moderators
Posted

Try this:

#include <IE.au3>

$sURL = "www.SomeWhere.com"
$oIE = _IECreate($sURL)
$oForm = _IEFormGetCollection($oIE, 0) ; References the first form the the page, change accordingly.
$oInput = _IEFormElementGetObjByName($oForm, "deposit_all")
_IEAction($oInput, "click")
_IELoadWait($oIE)

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
×
×
  • Create New...