objIE.Writeln from 2nd script

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Marty Henderson (MooseGuy57_at_msn.com)
Date: 04/29/04


Date: Thu, 29 Apr 2004 14:51:45 -0600


>From VBScript/WSH I creat an IE window for outputting script status. Problem
is, my script calls other script and I want to output script status from
those scripts into the same IE window. How do I bind to the IE instance from
a script which did not originally create the IE application?

Here is the code I created to start the original IE application window in
script a.vbs...

Set objIE = CreateObject("InternetExplorer.Application")
Set objDoc = objIE.Document

objIE.Navigate "about:blank"
objIE.Visible = TRUE
objIE.RegisterAsBrowser = TRUE

Do While (objIE.Busy)
Loop

objDoc.Writeln "<html><head><title>My Project " &_
                        WScript.ScriptName & " Status" &_
                        "</title></head><body bgcolor='white'>"

objDoc.Writeln "<font face=Arial size=1>" &_
                        Now & " - </font>" &_
                        "<font face=Verdana size=2><b>" &_
                       WScript.ScriptFullName &_
                       " Script Execution Started" &_
                       "</font></b><br><br>"

Again, I want to bind to this IE instance from, say, b.vbs and output to the
same IE window. Can I do this?

Thanks,
Marty



Relevant Pages

  • Re: The Groovy Programming Language
    ... >> Now if only Lisp had a GUI! ... Live interaction between source-edit window and run-program ... associated with a script, could be extended to mulitple levels. ... show a process window into which you drag the icons of those two files. ...
    (comp.lang.lisp)
  • RE: Guided Helpl -pdm.dlError
    ... My computer has 2 pdm.dll files, one to Debug script in Office and the other ... There is no script debug for Internet ... GH window opens, Connects to ... After disabling Script debugging in the Internet options. ...
    (microsoft.public.windowsxp.general)
  • Re: Get OS versions from AD
    ... As long as strRootDomain is a valid AdsPath ... if the IE window is open and the name of the ... script so it would look only at my OU. ... The computer objects in AD have the attributes operatingSystem, ...
    (microsoft.public.scripting.vbscript)
  • Re: "Run As," Adding Names to Drop-Down Box
    ... username you specified to start the program. ... prompt to enter my password. ... Second one, I see a window flash, then nothing. ... On the second one, the script, make sure you have the quotations ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: DOS batch file -based installer going VS scripting - need more direction
    ... I'd like to make it GUI ish, like using Windows for user interface. ... Instead of trying to bend code fragments from an unrelated thread to suit ... For starters I recommend you write a little VB Script program for Steps 2 ... normal DOS screen while its GUI window shows up, ...
    (microsoft.public.scripting.vbscript)