Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vbscript question

Status
Not open for further replies.

funkyspirit

Programmer
Oct 6, 2011
12
GB
Hi there,

I have a vbscript question.

Is there a vbscript equivalent to the Javascript document.getElementById?

If yes, could you provide me with an example please?

Thanks.
 
Hi !
This is an example that you can use it with vbscript to fill out a website form like Gmail
Code:
Dim IE
Set IE = Wscript.CreateObject("InternetExplorer.Application")
IE.Visible = 1 
IE.navigate "[URL unfurl="true"]http://mail.google.com/"[/URL]
Do While (IE.Busy)
    WScript.Sleep 10
Loop
Set Helem = IE.document.getElementById("Email")
Helem.Value = "YourLoginHere"     'Put here your Login Name 
Set Helem = IE.document.getElementById("Passwd")
Helem.Value = "YourPasswordHere"  'put your password
Set Helem = IE.document.Forms(0)
Helem.Submit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top