Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Batch file to login to my mail id  (Read 5108 times)

0 Members and 1 Guest are viewing this topic.

nskashu2080

  • Guest
Batch file to login to my mail id
« on: April 27, 2011, 04:04:59 AM »
Hi All,

I was wondering if it is possible to create a batch file which opens www.yahoomail.com, enters my userid and password and logs into the email account.

Is this possible in DOS? Is it possible for us to send inputs to webpage through command line.
Can anybody help in this?
Salman trout, can u pls give ur useful inputs.

Thanks in advance..

Balwinder Singh

  • Guest
Re: Batch file to login to my mail id
« Reply #1 on: May 06, 2011, 03:10:19 AM »
plz tell me about batch file

Sidewinder



    Guru

    Thanked: 126
  • Experience: Familiar
  • OS: Windows 10
Re: Batch file to login to my mail id
« Reply #2 on: May 06, 2011, 08:53:12 AM »
Quote
Is this possible in DOS? Is it possible for us to send inputs to webpage through command line.

Not that I'm aware of. You might try VBScript which has several ways of handling this.

One would be to fire up the browser and send keystrokes to the rendered page. This can be successful, but timing is everything and any misfire can produce unexpected results.

A second way would be to create an instance of the browser where you can script both the browser and the rendered page.

You can use this little snippet as a template which shows off the second method:

Code: [Select]
Set IE = CreateObject("InternetExplorer.Application")
Set WshShell = WScript.CreateObject("WScript.Shell") 

IE.Navigate "http://www.yahoomail.com"
IE.Visible = True

Do
  WScript.Sleep 5000
Loop While IE.Busy
 
IE.Document.All.Item("login").Value = "username"   'Change username as needed
IE.Document.All.Item("passwd").Value = "password"  'Change password as needed

WshShell.SendKeys "{ENTER}"

Good luck.  8)

@Balwinder Singh: Start your own thread and please be more specific.

This is probably nothing but I'm tired of chasing shadows around every corner.
The true sign of intelligence is not knowledge but imagination.

-- Albert Einstein