Sign in to follow this  
Followers 0
E1M1

IE example from help doesn't work

3 posts in this topic

Following code doesn't inject user/pass. Any ideas? user name and password fields just stay blank. (i use IE 8 on win win 7)

#include <IE.au3>
; Create a browser window and navigate to hotmail
$oIE = _IECreate ("http://autoit.pri.ee/forum/ucp.php?mode=login")

; get pointers to the login form and username, password and signin fields
$o_form = _IEFormGetObjByName ($oIE, "f1")
$o_login = _IEFormElementGetObjByName ($o_form, "username")
$o_password = _IEFormElementGetObjByName ($o_form, "password")
$o_signin = _IEFormElementGetObjByName ($o_form, "SI")

$username = "your username here"
$password = "your password here"

; Set field values and submit the form
_IEFormElementSetValue ($o_login, $username)
_IEFormElementSetValue ($o_password, $password)
_IEAction ($o_signin, "click")

edited

Share this post


Link to post
Share on other sites



Where did you get that example code? I thought all the examples where replaced to use the example forms. (Are you by any chance using an old version of Autoit?)

The reason it doesn't work is because some names of elements changed.

Try this instead:

#include <IE.au3>
; Create a browser window and navigate to hotmail
$oIE = _IECreate ("http://autoit.pri.ee/forum/ucp.php?mode=login")

; get pointers to the login form and username, password and signin fields
$o_form = _IEFormGetObjByName ($oIE, "login") ;The form id changed
$o_login = _IEFormElementGetObjByName ($o_form, "username")
$o_password = _IEFormElementGetObjByName ($o_form, "password")
$o_signin = _IEFormElementGetObjByName ($o_form, "login") ;the button name changed

$username = "your username here"
$password = "your password here"

; Set field values and submit the form
_IEFormElementSetValue ($o_login, $username)
_IEFormElementSetValue ($o_password, $password)
_IEAction ($o_signin, "click")

Share this post


Link to post
Share on other sites

tnx


edited

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