Sign in to follow this  
Followers 0
jimmyjmmy

script to auto log into hotmail

12 posts in this topic

Hi,

I have several hotmail accounts. They are saved in my excel files. I wish to write a script to automatically log in these hotmail accounts periodically so that they remain active accounts.

Can someone guide me.

Thanks

Share this post


Link to post
Share on other sites



Start by studying IE.au3 (IE Management UDF) and Excel.au3 (Excel Management UDF).

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

Start by studying IE.au3 (IE Management UDF) and Excel.au3 (Excel Management UDF).

Dale

Ok, Thanks

Share this post


Link to post
Share on other sites

Ok, thanks DaleHohm.

Now I have the undermentioned working script below. It is used to auto login into, and auto logout from a hotmail account.

This is done to prevent these accts from being de-activated due to inactivity. I have 5 different hotmail accounts and so what must I do to repeat the processes below 5 times.

#### my script ############

#include <IE.au3>

$oIE = _IECreate ("http://mail.live.com")

WinSetState ( "Sign In - Windows Internet Explorer", "Sign In - Windows Internet Explorer", @SW_MAXIMIZE )

WinWaitActive("Sign In - Windows Internet Explorer")

$Hotmail_ID = _IEGetObjByName ($oIE, "i0116")

$Hotmail_email_address = "myhotmail@hotmail.com"

_IEFormElementSetValue ($Hotmail_ID,$Hotmail_email_address)

$password = _IEGetObjByName ($oIE, "i0118")

$email_password = "123456"

_IEFormElementSetValue ($password,$email_password)

$submit = _IEGetObjByName($oIE, "idSIButton9")

_IEAction($submit, "click")

WinWaitActive("Windows Live Hotmail - Windows Internet Explorer")

$submit = _IEGetObjByName($oIE, "uxp_hdr_signOut")

_IEAction($submit, "click")

Share this post


Link to post
Share on other sites

............

ok, I will use the while function to repeat the above scripts 5 times like this :-

#include <IE.au3>

$i = 0

While $i <= 4

$i = $i + 1

$oIE = _IECreate ("http://mail.live.com")

WinSetState ( "Sign In - Windows Internet Explorer", "Sign In - Windows Internet Explorer", @SW_MAXIMIZE )

WinWaitActive("Sign In - Windows Internet Explorer")

$Hotmail_ID = _IEGetObjByName ($oIE, "i0116")

$Hotmail_email_address = "itshardtogetone@hotmail.com"

_IEFormElementSetValue ($Hotmail_ID,$Hotmail_email_address)

$password = _IEGetObjByName ($oIE, "i0118")

$email_password = "6636888"

_IEFormElementSetValue ($password,$email_password)

$submit = _IEGetObjByName($oIE, "idSIButton9")

_IEAction($submit, "click")

WinWaitActive("Windows Live Hotmail - Windows Internet Explorer")

$submit = _IEGetObjByName($oIE, "uxp_hdr_signOut")

_IEAction($submit, "click")

WEnd

Share this post


Link to post
Share on other sites

.and Excel.au3 (Excel Management UDF).

Dale

Hi,

Searching from AutoIT help, I cant locate Excel.au3.

Thanks

Share this post


Link to post
Share on other sites

It's already included in the distro of autoit. .......

So where can I read some notes on excel.

I launch the AutoIt Help and navigate to Content/user defined functions/ but I cant find anything related to excel.

Thanks

Share this post


Link to post
Share on other sites

Did you search? I could be wrong about it being included but I think it is.

I am using windowsXP.

Yes I did a search for excel.au3 in c-drive, no such files found.

I also did a search from the autoIT help but I could not find anything on excel.

Share this post


Link to post
Share on other sites

Hi,

Searching from AutoIT help, I cant locate Excel.au3.

Thanks

Sorry, it was released in the beta version.

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

Hmmmmm I could see where you'd need to automate it if you had a dozen accounts but

for 5 it might be just as easy to use Firefox and SecureLogin addon, or use Opera with the Wand Password.

Either one handles multiple accounts for the same site. If there's only one password saved for a site it just logs in. If there are multiple it pops up a dialog and you select the one you want. Once set up you can

log in to Hotmail in a few clicks with no typing.

I use Firefox a lot more than Opera so I use Secure Login addon. You can put a Key Icon on the toolbar that is active when there's a saved password for the current page. Just click the key to log in.

If it was to your online banking I'd say use something more secure but for Hotmail it should be good enough. :)

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