Hi, I am tring to automate and streamline some processes at my job so I created an HTML document that uses javascript to compile information from a form and pass it to a vbscript function to execute. I use notepad as a testing program to receive the sent keys. My program works like a champ on my computer but on a co-worker's computer the script gets "hung-up" and internet explorer pops up with a message that says:
"A script on this page is causing Internet Explorer to run slowly. If it continues to run, your computer may become unresponsive. Do you want to abort the script?"
A sample of the program I have is below. It seems to get hung-up and displays the IE message after it executes this line of code: 'ss.SendKeys strPassword'
function wait()
Dim starttime, currenttime, waittime
waittime = 3
starttime = Timer()
currenttime = starttime
Do Until currenttime-starttime > waittime
'Do nothing
currenttime = Timer()
Loop
end function
function PassValues
Dim ss, strUserName, strPassword, strPassedValue
strUserName = document.form.UserName.value + "{enter}"
strPassword = document.form.Password.value + "{enter}"
strPassedValue = document.form.output.value
Set ss = CreateObject("WScript.Shell"
ss.run "C:\WINNT\NOTEPAD.EXE",1
wait()
ss.SendKeys strUserName
wait()
ss.SendKeys strPassword
wait()
ss.SendKeys "1{enter}JOBREQUEST{enter}3" + strPassedValue
Set ss = nothing
end function
Thanks for your time,
Jason
"A script on this page is causing Internet Explorer to run slowly. If it continues to run, your computer may become unresponsive. Do you want to abort the script?"
A sample of the program I have is below. It seems to get hung-up and displays the IE message after it executes this line of code: 'ss.SendKeys strPassword'
function wait()
Dim starttime, currenttime, waittime
waittime = 3
starttime = Timer()
currenttime = starttime
Do Until currenttime-starttime > waittime
'Do nothing
currenttime = Timer()
Loop
end function
function PassValues
Dim ss, strUserName, strPassword, strPassedValue
strUserName = document.form.UserName.value + "{enter}"
strPassword = document.form.Password.value + "{enter}"
strPassedValue = document.form.output.value
Set ss = CreateObject("WScript.Shell"
ss.run "C:\WINNT\NOTEPAD.EXE",1
wait()
ss.SendKeys strUserName
wait()
ss.SendKeys strPassword
wait()
ss.SendKeys "1{enter}JOBREQUEST{enter}3" + strPassedValue
Set ss = nothing
end function
Thanks for your time,
Jason