Jump to content

Website Autologin help


RichGain
 Share

Recommended Posts

I have tried to use some of the auto login scripts that have been posted but have had no luck getting the auto login to work. Here is the relevant source for the webpage that I want to get the auto login to work on. The site address is: http://www.wizards.com/dnd/launch.aspx?x=dnd/dnd/cblaunch

<div class="MainHeader">

<div class="MainHeaderLogo"><a href="/DnD/Default.aspx"><img src="/DnD/Images/4new/new_logo_small.png" border="0"/></a></div>

<div class="DnDiLoginBox">

<div class="LoginBoxWrapper">

<div class="LoginBox">

<div class="LoginStart" id="LoginStart" >

<div class="LoginMenuOpen">

<a href="javascript:void(0);" id="ctl00_ctl00_ctl00_ctl00_SiteContent_DnDContent_ctl00_SignIn" onclick="return DisplaySignInMenu(this);"><img src="Globals/Images/Login/sign_in_1.png" border="0" /></a>

<a href="/dnd/subscription.aspx"><img src="Globals/Images/Login/subscribe_1.png" border="0" /></a>

</div>

<div class="LoginMenuLogo">

<img src="Globals/Images/Login/ddilogo.png" border="0" />

</div>

</div>

<div class="LoginMenu" id="LoginMenu" style="display:none;">

<div class="LoginMenuClose">

<a href="javascript:void(0);" onclick="return DisplaySignInMenu(this);"><img rc="Globals/Images/Login/sign_in_2.png" border="0" /></a>

<a href="/dnd/subscription.aspx"><img src="Globals/Images/Login/subscribe_1.png" id="ctl00_ctl00_ctl00_ctl00_SiteContent_DnDContent_ctl00_Img1" border="0" /></a>

</div>

<div class="LoginMenuLogo">

<img src="Globals/Images/Login/ddilogo.png" border="0" />

</div>

<div class="LoginMenuShaded">

<input name="ctl00$ctl00$ctl00$ctl00$SiteContent$DnDContent$ctl00$ChallengeID" type="hidden" id="ctl00_ctl00_ctl00_ctl00_SiteContent_DnDContent_ctl00_ChallengeID" value="0" /><input name="ctl00$ctl00$ctl00$ctl00$SiteContent$DnDContent$ctl00$Challenge" type="hidden" id="ctl00_ctl00_ctl00_ctl00_SiteContent_DnDContent_ctl00_Challenge" value="77040563" /><input name="ctl00$ctl00$ctl00$ctl00$SiteContent$DnDContent$ctl00$Vector" type="hidden" d="ctl00_ctl00_ctl00_ctl00_SiteContent_DnDContent_ctl00_Vector" value="56875698" />

<div class="LoginBoxRight">

<div class="LoginBoxUserName">

<div class="LoginHeaderText">Please enter your user name and password to sign in.</div>

<input name="ctl00$ctl00$ctl00$ctl00$SiteContent$DnDContent$ctl00$UserName" type="text" id="ctl00_ctl00_ctl00_ctl00_SiteContent_DnDContent_ctl00_UserName" class="UserName" onfocus="SwapLoginInputClassNameIfEmpty(this, 'UserName Selected');" onblur="SwapLoginInputClassNameIfEmpty(this, 'UserName');" onkeypress="return Login(event, this);" /><input name="ctl00$ctl00$ctl00$ctl00$SiteContent$DnDContent$ctl00$UserPassword" type="password" id="ctl00_ctl00_ctl00_ctl00_SiteContent_DnDContent_ctl00_UserPassword" class="UserPassword" onfocus="SwapLoginInputClassNameIfEmpty(this, 'UserPassword Selected');" onblur="SwapLoginInputClassNameIfEmpty(this, 'UserPassword');" onkeypress="return Login(event, this);" /><input type="image" name="ctl00$ctl00$ctl00$ctl00$SiteContent$DnDContent$ctl00$LoginButton" id="ctl00_ctl00_ctl00_ctl00_SiteContent_DnDContent_ctl00_LoginButton" class="GoButton" src="Globals/Images/Login/go_button.png" onclick="return Login(event, this);" style="border-width:0px;" /><span class="RememberMeCheckBox"><input id="ctl00_ctl00_ctl00_ctl00_SiteContent_DnDContent_ctl00_RememberMe" type="checkbox" name="ctl00$ctl00$ctl00$ctl00$SiteContent$DnDContent$ctl00$RememberMe" /><label for="ctl00_ctl00_ctl00_ctl00_SiteContent_DnDContent_ctl00_RememberMe">Remember Me</label></span><div id="ctl00_ctl00_ctl00_ctl00_SiteContent_DnDContent_ctl00_LoginMessageArea" class="LoginMessageArea"><a href="https://accounts.wizards.com/content/ForgotPassword.aspx" target="_blank">Forgot Password?</a></div>

</div>

</div>

</div>

</div>

Edited by RichGain
Link to comment
Share on other sites

** nobody needs the html, that just clutters (and probably deters help)

looks like 5 tabs gets you to the user field so something like:

send ("{tab}")
sleep (250)
send ("{tab}")
sleep (250)
send ("{tab}")
sleep (250)
send ("{tab}")
sleep (250)
send ("{tab}")
sleep (250)
send("username")
sleep (250)
send ("{tab}")
sleep (250)
send("password")

login is probably fine, but i would not make inquiries much further into the gaming realm without reading the sticky.

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

no worries, code tags around blocks as such would also help the appearance of your topic.

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

I am sorry, I am a noob. How do I have it automatically go to the website and then login? I tried combining it with another login script, but it does not do anything once it gets to a website. Here is the script:

#include <IE.au3>

$url = "http://www.wizards.com/dnd/launch.aspx?x=dnd/dnd/cblaunch" ;
$oIE = _IECreate ($url)
_IELoadWait ($oIE)

send ("{tab}")
sleep (250)
send ("{tab}")
sleep (250)
send ("{tab}")
sleep (250)
send ("{tab}")
sleep (250)
send ("{tab}")
sleep (250)
send("username")
sleep (250)
send ("{tab}")
sleep (250)
send("password")

Rich

Link to comment
Share on other sites

ShellExecute ("http://www.wizards.com/dnd/launch.aspx?x=dnd/dnd/cblaunch")

sleep (10000)

send ("{tab}")
sleep (250)
send ("{tab}")
sleep (250)
send ("{tab}")
sleep (250)
send ("{tab}")
sleep (250)
send ("{tab}")
sleep (250)
send("username")
sleep (250)
send ("{tab}")
sleep (250)
send("password")

imagine it has something to do with the active window

Edited by iamtheky

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

#include <IE.au3>

$sName = "username"
$sPassword = "password"
$sUrl = "http://www.wizards.com/dnd/launch.aspx?x=dnd/dnd/cblaunch"


$oIE = _IECreate($sUrl)
Sleep(3000)
$oHWND = _IEPropertyGet($oIE, "hwnd")
WinSetState($oHWND, "", @SW_MAXIMIZE)
$oForm = _IEFormGetCollection($oIE, 0)
$oName = _IEGetObjByName($oForm, "ctl00$ctl00$ctl00$ctl00$SiteContent$DnDContent$ctl00$UserName") 
$oPassword = _IEGetObjByName($oForm, "ctl00$ctl00$ctl00$ctl00$SiteContent$DnDContent$ctl00$UserPassword") 
$oSubmit = _IEGetObjByName($oForm, 'ctl00$ctl00$ctl00$ctl00$SiteContent$DnDContent$ctl00$LoginButton')
_IEFormElementSetValue($oName, $sName)
_IEFormElementSetValue($oPassword, $sPassword)
_IEAction ($oSubmit, "click")

The page didnt load for me so cant confirm this works, but it may put you on the right track hopefully.

Edited by Hadez
Link to comment
Share on other sites

Thanks for all the replies. There was some problem accessing the website through ie, so we decided to use Firefox. We made Firefox the default browser. Here is what we ended up with. It is not pretty, but it works. The problem with the tab system is that the config on Firefox needs to be the same for the number of tabs. One extra toolbar messes it all up. We are running this on 10 pc's so we needed to make sure firefox was configured the same on all.

ShellExecute ("http://www.wizards.com/dnd/launch.aspx?x=dnd/dnd/cblaunch")  sleep (10000)  send ("{tab}") sleep (250) send ("{tab}") sleep (250) send ("{tab}") sleep (250) send ("{tab}") sleep (250) send ("{tab}") sleep (250) send("username") sleep (250) send ("{tab}") sleep (250) send("password")send ("{tab}") sleep (250)send ("{enter}") sleep (250)

Its working good right now.

Rich Gain

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...