Check and Log into Form

This allows you to automatically log into a website if it uses a form/pop-up username and password.

Dim IE
Dim Helem
on error resume next
set WshShell = WScript.CreateObject("WScript.Shell")
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = 1
WScript.Sleep 3000
'WshShell.AppActivate "Windows Security"
'WScript.Sleep 1000
'WshShell.SendKeys "{ESC}"
Set Helem = IE.document.getElementByID("formUsername")
Helem.Value = "YOURUSERNMAE" ' change this to yours
Set Helem = IE.document.getElementByID("formPassword")
Helem.Value = "YOURPASSWORD" ' change this to yours
Set Helem = IE.document.Forms(0)

Do While (IE.Busy)
WScript.Sleep 10

Dim someElement
Set someElement = IE.document.getElementByID("someElement")
If Len(someElement.innerText) > 0 Then
MsgBox "logged in"
'WScript.Sleep 2000
'WshShell.SendKeys "{F5}"
End If