MyITGuy
|
(Fresh Scripter)
|
2002-05-27 11:48 PM
|
|
|
|
|
InternetExplorer.Application Document.Write Problem
|
|
I'm a little frustrated right now, so please forgive if I am short or rude.
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. Am I missing something?
Thank you, in advance for any assistance.
|
Radimus
|
(KiX Supporter)
|
2002-05-27 11:58 PM
|
|
|
|
|
Re: InternetExplorer.Application Document.Write Problem
|
|
try writing it before making it visible...
|
Shawn
|
(KiX Supporter)
|
2002-05-28 02:40 AM
|
|
|
|
|
Re: InternetExplorer.Application Document.Write Problem
|
|
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 ]
|
MyITGuy
|
(Fresh Scripter)
|
2002-05-28 05:49 AM
|
|
|
|
|
Re: InternetExplorer.Application Document.Write Problem
|
|
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)
|
MyITGuy
|
(Fresh Scripter)
|
2002-05-28 05:52 AM
|
|
|
|
|
Re: InternetExplorer.Application Document.Write Problem
|
|
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.
|
|
Re: InternetExplorer.Application Document.Write Problem
|
|
As an alternative, you can use KIXForms as a progress bar.
See the following post for info: KiXForms
|