Page 1 of 1 1
Topic Options
#85785 - 2002-05-27 11:48 PM InternetExplorer.Application Document.Write Problem
MyITGuy Offline
Fresh Scripter

Registered: 2001-01-30
Posts: 11
[Mad] I'm a little frustrated right now, so please forgive if I am short or rude. [Big Grin]

I am attempting to use this Visual Basic Script:
code:
Set objMSIE = CreateObject("InternetExplorer.Application.1")
Set WshShell = CreateObject("WScript.Shell")
objMSIE.Navigate "about:blank"
objMSIE.Toolbar = False
objMSIE.StatusBar = False
objMSIE.Resizable = False
objMSIE.AddressBar = False
objMSIE.FullScreen = True
objMSIE.Offline = False
objMSIE.RegisterAsBrowser = True
objMSIE.Visible = True
WshShell.AppActivate("Microsoft Internet Explorer")

objMSIE.Document.Write "<HTML><TITLE>Something</TITLE><BODY bgcolor=#FFFFFF>"
objMSIE.Document.Write "<B>Running: Allow Script Before Logon Script...</B><BR><BR>"
objMSIE.Document.Write "<B>Exiting.</B><BR><BR>"

Set objMSIE = nothing
Set WshShell = nothing

And convert it to KiXtart Scripting as follows:
code:
$objMSIE = CreateObject("InternetExplorer.Application")
$WshShell = CreateObject("WScript.Shell")
$objMSIE.Navigate("about:blank")
$objMSIE.Toolbar = False
$objMSIE.StatusBar = False
$objMSIE.Resizable = False
$objMSIE.AddressBar = False
$objMSIE.FullScreen = True
$objMSIE.Offline = False
$objMSIE.RegisterAsBrowser = True
$objMSIE.Visible = True
$WshShell.AppActivate("Microsoft Internet Explorer")

$objMSIE.Document.Write "<HTML><TITLE>Something</TITLE><BODY bgcolor=#FFFFFF>"
$objMSIE.Document.Write "<B>Running: Allow Script Before Logon Script...</B><BR><BR>"
$objMSIE.Document.Write "<B>Exiting.</B><BR><BR>"

$objMSIE = 0
$WshShell = 0

The Visual Basic Script works. The KiXtart Script version open Internet Explorer, but never writes to it. [Confused] Am I missing something?

Thank you, in advance for any assistance.
_________________________
Automating your life to make my life easier.

Top
#85786 - 2002-05-27 11:58 PM Re: InternetExplorer.Application Document.Write Problem
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
try writing it before making it visible...
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#85787 - 2002-05-28 02:40 AM Re: InternetExplorer.Application Document.Write Problem
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
And to add to Rad's comments, make sure you sync-up with the document object by adding a while loop before your writes, plus add brackets around your writes:

code:
while $objMSIE.busy and @error = 0 loop
$objMSIE.Document.Write("<HTML><TITLE>Something</TITLE><BODY bgcolor=#FFFFFF>")
$objMSIE.Document.Write("<B>Running: Allow Script Before Logon Script...</B><BR><BR>")
$objMSIE.Document.Write("<B>Exiting.</B><BR><BR>")

Hope this helps

-Shawn

[ 28 May 2002, 02:41: Message edited by: Shawn ]

Top
#85788 - 2002-05-28 05:49 AM Re: InternetExplorer.Application Document.Write Problem
MyITGuy Offline
Fresh Scripter

Registered: 2001-01-30
Posts: 11
Radimus, how would I dynamically update the content?

I want the user to see a statement showing where they are in the login process.(after every section of script it tells them 2 of 4 done or something liket that)
_________________________
Automating your life to make my life easier.

Top
#85789 - 2002-05-28 05:52 AM Re: InternetExplorer.Application Document.Write Problem
MyITGuy Offline
Fresh Scripter

Registered: 2001-01-30
Posts: 11
Damn, damn, damn. And, thank you, thank you, thank you...it was the brackets. As soon as I saw that...UHHHHH!!!!

Thank all that assisted.

Take care.
_________________________
Automating your life to make my life easier.

Top
#85790 - 2002-05-28 04:18 PM Re: InternetExplorer.Application Document.Write Problem
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
As an alternative, you can use KIXForms as a progress bar.

See the following post for info:
KiXForms
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 466 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.053 seconds in which 0.012 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org