I created a script which retrieves values from registry
keys on all networked (online) computers in our domain.
For that purpose some kind of progress indicator was needed.
This is the *example* how that was made:

---START---
Set objExplorer = CreateObject("InternetExplorer.Application")
objExplorer.Navigate "about:blank"
objExplorer.ToolBar = 0
objExplorer.StatusBar = 0
objExplorer.Width = 800
objExplorer.Height = 600
objExplorer.Left = 0
objExplorer.Top = 0
Do While (objExplorer.Busy)
Wscript.Sleep 200
Loop
objExplorer.Visible = 1
objExplorer.Document.Body.InnerHTML = "Progress..."
Do While 1=1
objExplorer.Document.Body.InnerHTML =
objExplorer.Document.Body.InnerHTML & "<BR>" & "some text..."
Wscript.Sleep 300
Loop
Wscript.Quit
---END---

When this script is run, Internet Explorer is started and lines
with text "some text..." are added one under another.
When there is too much text to fit on the screen, vertical scrollbar
is automatically created and text is scrollable.
The question is how to modify the script so that when lines
of text are added to the bottom the window automatically scrolls
to show the last line added to log, without user having to scroll
manually to see the newest lines?

Drazen

Re: Automatically scrolling IE window to show last lines added by Torgeir

Torgeir
Fri Aug 13 14:02:20 CDT 2004

Drazen wrote:

> I created a script which retrieves values from registry
> keys on all networked (online) computers in our domain.
> For that purpose some kind of progress indicator was needed.
> This is the *example* how that was made:
> (snip code)
>
> When this script is run, Internet Explorer is started and lines
> with text "some text..." are added one under another.
> When there is too much text to fit on the screen, vertical scrollbar
> is automatically created and text is scrollable.
> The question is how to modify the script so that when lines
> of text are added to the bottom the window automatically scrolls
> to show the last line added to log, without user having to scroll
> manually to see the newest lines?
Hi

Use insertAdjacentHtml "beforeBegin" and scrollIntoView:

See the 3rd progress bar example by Joe Earnest here:
http://groups.google.com/groups?selm=%23BDv%24av%24DHA.1288%40TK2MSFTNGP10.phx.gbl

Another example:
http://groups.google.com/groups?selm=400F20F1.AD140C21%40hydro.com


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx

Re: Automatically scrolling IE window to show last lines added by Alex

Alex
Sat Aug 14 18:16:18 CDT 2004

Tom Lavedas wrote:
> Torgeir, you're just too fast for me. It took me ten minutes to work
> this example up - and your answer snuck in before I could post ;-) ...

I can beat him.

The trick is to post when it's nighttime in Porsgrunn. ;)



Re: Automatically scrolling IE window to show last lines added by Torgeir

Torgeir
Sun Aug 15 08:17:42 CDT 2004

Alex K. Angelopoulos [MVP] wrote:

> Tom Lavedas wrote:
>
>>Torgeir, you're just too fast for me. It took me ten minutes to work
>>this example up - and your answer snuck in before I could post ;-) ...
>
>
> I can beat him.
>
> The trick is to post when it's nighttime in Porsgrunn. ;)

Make that very late nighttime in Porsgrunn ;-)

But now I think I will take some vacation, so the newsgroups
are all yours the coming week :-)


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx