Computer Hope
Microsoft => Microsoft DOS => Topic started by: nskashu2080 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..
-
plz tell me about batch file
-
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:
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.