Sign in to follow this  
Followers 0
Klexen

Click button by value?

2 posts in this topic

http://v3.newzbin.com/

I'm just trying to have the script auto login...

Here is what I have.

CODE
#include <IE.au3>

$sURL = "http://v3.newzbin.com/"

$oIE = _IECreate($sURL, 0, 0, 0)

$HWND = _IEPropertyGet($oIE, "hwnd")

WinSetState($HWND, "", @SW_MAXIMIZE)

_IEAction($oIE, "visible")

_IELoadWait($oIE)

$iframe = $oIE

$iframe.document.getelementbyid ("username").value = "test"

$iframe.document.getelementbyid ("password").value = "*test"

$iframe.getelementbyid("???").click ; I would just put in ID of button but the button has no ID. Is there a way to click the button by value?

Share this post


Link to post
Share on other sites



This should get you headed in the right direction.

#include <IE.au3>

$sURL = "http://v3.newzbin.com/"
$sUsername = "Username"
$sPassword = "Password"

$oIE = _IECreate($sURL)
$oForm = _IEFormGetCollection($oIE, 1)
$oUsername = _IEFormElementGetObjByName($oForm, "username")
$oPassword = _IEFormElementGetObjByName($oForm, "password")

_IEFormElementSetValue($oUsername, $sUsername)
_IEFormElementSetValue($oPassword, $sPassword)

_IEFormSubmit($oForm)

Share this post


Link to post
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
Sign in to follow this  
Followers 0