rosado
asked on
VBScript - Script Showing Results on an Internet Explorer Window
Hi All,
I want my logon script to open an IE window (with a page with a company logo on the top) and show the script results (like "Mapping Network Drives", "Checking Disk Space", etc...) scrooling on it.
I can successfully open IE and show the results scrooling on a blank page but I cant figure out how to do that with a pre-created page since I need the company logo to stick to the top of the page and not scroll up as the results shows up.
Does anyone have any idea on how to do that or any refference that might help me? Thanks!
Here is the code I have so far. Basically "AcivateIE" opens IE and "Log" show the result on the IE Screen.
Thanks to ALL!
Set objIE = CreateObject("InternetExpl orer.Appli cation")
ActivateIE
Set IEWindow = objIE.Document.all("cont")
log("teste1")
log("teste2")
wscript.sleep 3000
objIE.quit
sub Log(var)
set doc = objIE.document
report = doc.documentelement.innerh tml ' Need to keep adding the new results
Report= Report & var & "<br>" ' or old ones will be erased...
IEWindow.INNERHTML = Report
objIE.document.body.create textrange. scrollInto View False
end sub
sub ActivateIE
objIE.Navigate "about:blank"
objIE.ToolBar = false:objIE.StatusBar = False:objIE.Resizable = True
Do While objIE.Busy
loop
set doc = objIE.document
objIE.Width = 600:objIE.Height = 400
objIE.Left = 50:objIE.Top = 50
objIE.Visible = True
objIE.document.writeln("<h tml><title >Titulo</t itle><body ><DIV id='cont'></DIV></body></h tml>")
Set IEWindow = objIE.Document.all("cont")
end sub
I want my logon script to open an IE window (with a page with a company logo on the top) and show the script results (like "Mapping Network Drives", "Checking Disk Space", etc...) scrooling on it.
I can successfully open IE and show the results scrooling on a blank page but I cant figure out how to do that with a pre-created page since I need the company logo to stick to the top of the page and not scroll up as the results shows up.
Does anyone have any idea on how to do that or any refference that might help me? Thanks!
Here is the code I have so far. Basically "AcivateIE" opens IE and "Log" show the result on the IE Screen.
Thanks to ALL!
Set objIE = CreateObject("InternetExpl
ActivateIE
Set IEWindow = objIE.Document.all("cont")
log("teste1")
log("teste2")
wscript.sleep 3000
objIE.quit
sub Log(var)
set doc = objIE.document
report = doc.documentelement.innerh
Report= Report & var & "<br>" ' or old ones will be erased...
IEWindow.INNERHTML = Report
objIE.document.body.create
end sub
sub ActivateIE
objIE.Navigate "about:blank"
objIE.ToolBar = false:objIE.StatusBar = False:objIE.Resizable = True
Do While objIE.Busy
loop
set doc = objIE.document
objIE.Width = 600:objIE.Height = 400
objIE.Left = 50:objIE.Top = 50
objIE.Visible = True
objIE.document.writeln("<h
Set IEWindow = objIE.Document.all("cont")
end sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
lostcarpark, after some research, I was able to do that.
The frame tag wont accept bjIE.document.all("report" ).innerHTM L. I had to use
objIE.Document.frames("rep ort").docu ment.body. innerHTML instead and its working. Now I need to figure out how to make the new results scroll the old ones up but I should raise another question for that.
Rgds!
The frame tag wont accept bjIE.document.all("report"
objIE.Document.frames("rep
Rgds!
ASKER
Set myIE = CreateObject("InternetExpl
myIE.Navigate "c:\scripttests\htmtest.ht
'myIE.ToolBar = True:myIE.StatusBar = False:myIE.Resizable = True
Do While myIE.Busy
loop
myIE.Visible = True
Set IEWindow = myIE.Document.all("report"
for t = 1 to 3
Report= Report &"Test Line" &t & "<br>"
IEWindow.INNERHTML = Report
MyIE.document.body.createt
next
wscript.sleep 2000
MYie.QUIT