arryo Posted October 22, 2009 Share Posted October 22, 2009 (edited) Hi, For my new Script I want it to login at Youtube. But I dont really know how to do it. Here is my code: $acc = "thelulz" $pw = "doesnt exist. i know this will fail." $mIE = _IECreate ("www.youtube.com") ; here is something to check out if the user is already logged in. ; ---> he is not _IENavigate ($mIE, "http://www.youtube.com/login") $oForm = _IEFormGetObjByName($mIE, "loginform") $oUsername = _IEFormElementGetObjByName($oForm, "Email") ; <--- i think this is the error _IEFormElementSetValue($oUsername, $acc) $oPasswd = _IEFormElementGetObjByName($oForm, "Passwd") ; <--- i think this is the error _IEFormElementSetValue($oPasswd, $pw) _IEFormSubmit($oForm) Exit ofc I included <IE.au3>. Edited October 22, 2009 by arryo Link to comment Share on other sites More sharing options...
furrycow Posted October 22, 2009 Share Posted October 22, 2009 (edited) $acc = $pw = $mIE = _IECreate ("www.youtube.com") ; here is something to check out if the user is already logged in. ; ---> he is not _IENavigate ($mIE, "http://www.youtube.com/login") $oForm = _IEFormGetObjByName($mIE, "gaia_loginform") $oUsername = _IEFormElementGetObjByName($oForm, "Email") ; <--- i think this is the error _IEFormElementSetValue($oUsername, $acc) $oPasswd = _IEFormElementGetObjByName($oForm, "Passwd") ; <--- i think this is the error _IEFormElementSetValue($oPasswd, $pw) $oSignIn = _IEFormElementGetObjByName($oForm, "signIn") _IEAction($oSignIn,"click") ExitJust put the username/password in again..The things i noticed were...the form is not called loginform, its called "gaia_loginform"Also, i dont use the formsubmit thing, ive never managed to get it to work properly, so i just use the _ieaction.I managed to login in properly with my credentials, so this works.EDIT: Although just tried the formsubmit then and it works ...so you can change that back if you want..either way works. Edited October 22, 2009 by furrycow Instant Lockerz Invite - www.instantlockerzinvite.co.uk Link to comment Share on other sites More sharing options...
arryo Posted October 22, 2009 Author Share Posted October 22, 2009 Thx. Works! 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