Hello, I got tired of logging in to a web app at work so I wrote a quick script to log into the application for me. Everything works great, but for some reason I get an error that implies that I need an object for loginname on line 19. Login works great, just the windows Error Message box appears.
Any Ideas? I think is has something to do with the wait.
Here is the script:
dim objIE
dim objDoc
dim loginname
dim password
dim submit
set objIE = CreateObject("InternetExplorer.application")
objIE.navigate "xxx"
objIE.height = 740
objIE.left = 0
objIE.top = 0
objIE.width = 1020
objIE.visible = true
while objIE.busy
WScript.Sleep 100
wend
set objDoc = objIE.document
set loginname = objDoc.getElementById("aclUserName")
loginname.value = "xxx"
set password = objDoc.getElementById("password")
password.value = "xxx"
set submit = objDoc.getElementById("loginBtn")
submit.click()
Any Ideas? I think is has something to do with the wait.
Here is the script:
dim objIE
dim objDoc
dim loginname
dim password
dim submit
set objIE = CreateObject("InternetExplorer.application")
objIE.navigate "xxx"
objIE.height = 740
objIE.left = 0
objIE.top = 0
objIE.width = 1020
objIE.visible = true
while objIE.busy
WScript.Sleep 100
wend
set objDoc = objIE.document
set loginname = objDoc.getElementById("aclUserName")
loginname.value = "xxx"
set password = objDoc.getElementById("password")
password.value = "xxx"
set submit = objDoc.getElementById("loginBtn")
submit.click()