E1M1 Posted June 17, 2010 Share Posted June 17, 2010 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 Link to comment Share on other sites More sharing options...
Tvern Posted June 17, 2010 Share Posted June 17, 2010 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") Link to comment Share on other sites More sharing options...
E1M1 Posted June 17, 2010 Author Share Posted June 17, 2010 tnx edited Link to comment Share on other sites More sharing options...
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