Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Auto Login for blogger.com

$
0
0
I am quiet new to autoit and scripting itself.Kindly look at my code and suggest me a better way to do it.The following code works but when i try to get the form elements by name or type (for eg $fm.name=='email') it fails !!.Also i don't have much knowledge on dom elements ,kindly enlighten me on it related to my code.

objective:login to blogger account

my code
#include <ie.au3>
$oIE = _IECreate("https://accounts.google.com/ServiceLogin?service=blogger")
_IELoadWait($oIE)
$oForm = _IEFormGetObjByName ($oIE, "gaia_loginform")
$oFormElements = _IEFormElementGetCollection($oForm)
for $fm in $oFormElements
				 if($fm.type=='text') Then
						_IEFormElementSetValue($fm, "Found You", 0)
							 elseif($fm.type=='password') Then
										_IEFormElementSetValue($fm, "Found You", 0)
			  elseif($fm.type=='submit') Then
		  _IEFormSubmit($oForm)
	  endif
  
	 
  
   next


html source for the form
<form novalidate="" id="gaia_loginform" action="https://accounts.google.com/ServiceLoginAuth" method="post">
  <input type="hidden" name="service" id="service" value="blogger">
  <input type="hidden" name="dsh" id="dsh" value="-2655181513770911851">
  <input type="hidden" name="GALX" value="oBUZ5i4i_48">
  <input type="hidden" id="pstMsg" name="pstMsg" value="1">
  <input type="hidden" id="dnConn" name="dnConn" value="">
  <input type="hidden" id="checkConnection" name="checkConnection" value="youtube:491:1">
  <input type="hidden" id="checkedDomains" name="checkedDomains" value="youtube">
<input type="hidden" name="timeStmp" id="timeStmp" value="">
<input type="hidden" name="secTok" id="secTok" value="">
<input type="hidden" id="_utf8" name="_utf8" value="☃">
  <input type="hidden" name="bgresponse" id="bgresponse" value="js_disabled">
<div class="email-div">
  <label for="Email"><strong class="email-label">Email</strong></label>
  <input type="email" spellcheck="false" name="Email" id="Email" value="">
</div>
<div class="passwd-div">
  <label for="Passwd"><strong class="passwd-label">Password</strong></label>
  <input type="password" name="Passwd" id="Passwd">
</div>
  <input type="submit" class="g-button g-button-submit" name="signIn" id="signIn" value="Sign in">
  <label class="remember" onclick="">
  <input type="checkbox" name="PersistentCookie" id="PersistentCookie" value="yes">
  <strong class="remember-label">
  Stay signed in
  </strong>
  </label>
  <input type="hidden" name="rmShown" value="1">
  </form>


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>