Sign in to follow this  
Followers 0
BreadthFirst

Newbie question: Hotmail Login

4 posts in this topic

I'm quite embarassed to even have to ask this, but here goes:

I decided to try out the typical hotmail login program as an intro to using the IE.au3 UDF. I ran into a minor issue when signed into msn messenger before opening hotmail while running the script; I get the following page before the login forms appear:

Posted Image

I want to click "sign in with a different account" on this website, but the _IELinkClickByText command isn't working for some reason. Why doesn't this work? How can I get clicking on that link to work?

thanks!

Here is my code so far.

CODE
#include <IE.au3>

; create maximized hotmail window

$oIE = _IECreate("www.hotmail.com")

$oHwnd = _IEPropertyGet($oIE, "hwnd")

WinSetState($oHwnd, "", @SW_MAXIMIZE)

; if someone is already logged on and info page appears,

; click on "Sign in with a different account"

_IELinkClickByText($oIE, "Sign in with a different account") ; doesn't work

#cs

; login to hotmail

$oForm = _IEFormGetByName($oIE, "f1")

$oUserName = _IEFormElementGetObjByName($oForm, "login")

$pwd = _IEFormElementGetObjByName($oForm, "passwd")

_IEFormElementSetValue($oUserName, "emailaddress@hotmail.com")

_IEFormElementSetValue($pwd, "password")

#ce

Exit

Random question: is it necessary to insert the "Exit" at the end of any script or do scripts automatically terminate once they reach the end?

Share this post


Link to post
Share on other sites



Are you using DebugBar (or anything similar) to investigate the page structure? Strongly suggest it if not.

When you say "doesn't work" -- please be specific as to what you mean. For me, it show the login and passwd form.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

Are you using DebugBar (or anything similar) to investigate the page structure? Strongly suggest it if not.

When you say "doesn't work" -- please be specific as to what you mean. For me, it show the login and passwd form.

Dale

Hi Dale,

I am using debugbar, but I don't really know how to use it that well to be honest. When I drag debugbar's blue target on the "sign in with a different account" link, the program doesn't display any information. I'll start reading up on using the program, however.

If you run my script, does it immediately show the login and password form?? Or does it go to the "sign in with a different account" page and succesfully click on the link?

On my computer, hotmail opens in IE succesfully and takes me to the "sign in with a different account" page. However, the script doesn't successfully click on the "sign in with a different account" link--it doesn't seem to do anything.

Thanks for your help!

Share this post


Link to post
Share on other sites

Yes, I run your script and get the login and passwd form on the screen.

When DebugBar does not show you the source when you drag the bulls-eye, right-click it the DOM section in the top left and choose "Rebuild DOM tree".

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

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