how to write vb script code for login gmail page by using
notepad and how to run script in notepad
Answer Posted / bittu
Write the below code in atext file and save it with .vbs
extension and run it. U will login into gmail automatically.
Provide the credentials in the line 10 & 11.
---------------------------------
WScript.Quit Main
Function Main
Set IE =
WScript.CreateObject("InternetExplorer.Application", "IE_")
IE.Visible = True
IE.Navigate "http://www.gmail.com"
Wait IE
With IE.Document
.getElementByID("Email").value = "abcd"
.getElementByID("Passwd").value = "xyzp"
.getElementByID("gaia_loginform").submit
End With
End Function
Sub Wait(IE)
Do
WScript.Sleep 500
Loop While IE.ReadyState < 4 And IE.Busy
Do
WScript.Sleep 500
Loop While IE.ReadyState < 4 And IE.Busy
End Sub
Sub IE_OnQuit
On Error Resume Next
WScript.StdErr.WriteLine "IE closed before script finished."
WScript.Quit
End Sub
| Is This Answer Correct ? | 0 Yes | 10 No |
Post New Answer View All Answers
Anyone have qtp11.0 crack?
Write a Program to add 2 numbers without using operators (+,-) and without using third variable. Note: Use VBScript only Hint: You can use other operators like '/' & '*'(Division & Multiplication)
Explain about the support of asp for vb script functionality?
Why is it recommended to close the database connection every time after the work is completed?
Explain different types of segment?
How will you reverse a string in vbscript?
Which in-built function related to an array joins substrings into one string in the vbscript language?
How will you convert a string to upper case string using vbscript?
Which in-built functions are used to convert the specified expression in the form of date and string in the vbscript language?
who will create the object?
Plzzzzzzz can any one tell me which is the best institute in hyderabad for learing VBScript. plz do answer guys its urgent plzzzzzzz. thanks in advance.
How will you get a subset of a array in vbscript?
Which conditional statement is the most convenient one to use in the case of multiple conditions in the vbscript language?
What are string functions in vbscript?
What is the difference between javascript and vbscript?