I have been working a bit on your script, and a funny thing a have discovered is that when I do the following Kix crashes with an illegal operation error:code:
$ie = createobject("internetexplorer.application")
if $ie
$RC = $ie.navigate("http://www.microsoft.com")
$RC = $ie.visible = ("1")
while $ie.busy and @error = 0 loop
while $ie.readystate <> 4 and @error = 0 loop
$document = $ie.document
if $document
$RC = $document.open ()
? $RC
; The following line makes kix crash 
$RC = $document.write (<h4>Test</h4> )
? $RC
?"Name=" $document.nameprop ()
; The following get property does not work ...
?"Title=" $document.title ()
endif
endif
?"pause..." gets $k
exit
Another very strange thing is that the script does not open an Internet Explorer window??? I thought that was the point?
------------------
Cheers....
David