Figure 1

Figure 1 readyState Values

Value
Definition
Uninitialized
Object is not initialized with data
Loading
Object is loading its data
Loaded
Object has finished loading its data
Interactive
User can interact with the object even though it is not fully loaded
Complete
Object is completely initialized

Figure 2 Capturing readyState

  <SCRIPT id="scriptobj" src="somesource"> </SCRIPT>
<SCRIPT Language="Javascript">

function fn()
{
  if (scriptobj.readyState == "complete")
  {
   // do the stuff you want to do with the script, now that you know for 
   // a FACT that it is loaded.   
  }
}

// tell the scriptobj SCRIPT that you want to receive notifications when 
// its "readystate" property is changed.
scriptobj.onreadystatechange = fn;

// note that the above line will IMMEDIATELY return. do not add any code 
// after this that assumes that the script is loaded.
// such code must be in the fn() function.

</SCRIPT>

Figure 3 Address

  <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://schemas.biztalk.org/BizTalk/g9boxjl2.xsl" type="text/xsl"?>
<Schema xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-
microsoft-com:datatypes">
    <ElementType name="Line2" dt:type="string"/>
    <ElementType name="Line1" dt:type="string"/>
    <ElementType name="Address" content="eltOnly">
        <element type="Line1" minOccurs="1" maxOccurs="1"/>
        <element type="Line2" minOccurs="1" maxOccurs="1"/>
    </ElementType>
</Schema>

Figure 4 Person

  <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://schemas.biztalk.org/BizTalk/g9boxjl2.xsl" type="text/xsl"?>
<Schema xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-
microsoft-com:datatypes" xmlns:add="file://d:/temp/address.biz">
    <ElementType name="Home" content="eltOnly">
        <element type="add:Address" minOccurs="1"  />
    </ElementType>
    <ElementType name="Name" dt:type="string"/>
    <ElementType name="Person" content="eltOnly">
        <element type="Name" minOccurs="1"/>
        <element type="Home" minOccurs="1"/>
    </ElementType>
</Schema>

Figure 5 Getting the XML

  <%
Dim xmlDoc, xslDoc
Dim xmlFile, xslFile

Set xmlDoc = Server.CreateObject("MSXML2.DOMDOCUMENT")
Set xslDoc = Server.CreateObject("MSXML2.DOMDOCUMENT")

xmlFile = "cookie.xml"
xslFile = "cookie.xsl"    

xmlDoc.async = false
xmlDoc.load Server.MapPath(xmlFile)

xslDoc.async = false
xslDoc.load Server.MapPath(xslFile)

Response.Write xmlDoc.transformNode(xslDoc)
%>

Figure 6 Viewing Temporary Internet Files

  '********************************************
Dim fso, wshshell, MyFolder, WshSysEnv, sInetPath, iTempSize, sIEFiles 
Dim tempfolder, tempfile
Set fso = CreateObject("Scripting.FileSystemObject")
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshSysEnv = WshShell.Environment("PROCESS")

' Get Internet Explorer Temp path and create folder object & files 
' collection 
sInetPath  =  WshSysEnv("USERPROFILE") & "\Local" _
"Settings\Temporary Internet Files\Content.IE5"

Set MyFile = fso.CreateTextFile("c:\testfile.txt", True)

Set MyFolder = fso.GetFolder(sInetPath)

If MyFolder.SubFolders.Count Then
For Each tempfolder In myfolder.SubFolders
    Set sIEFiles = tempfolder.Files
    'Write to file and show in Notepad

    MyFile.WriteLine("————————————")
    MyFile.WriteLine("Time:  " & time())
    MyFile.WriteLine("Date:  " & date())
    MyFile.WriteLine("————————————")
    MyFile.WriteLine("Path:  " & sInetPath)
    MyFile.WriteLine("Count Before:  " & sIEFiles.Count)

    for each tempfile in sIEFiles
        MyFile.WriteLine("Filename:  " & tempfile.path)
    next 

Next 
end if

MyFile.Close

WshShell.Run("notepad c:\testfile.txt")
'********************************************

Figure 7 Using Exec

  Option Explicit
Dim FullPath
Dim Name
Dim Directory
Dim i
Dim Sh
Dim JSC
Dim PEVerify
Dim Cmd

If WScript.Arguments.Count = 0 Then
    WScript.Echo "Usage: mj filename args"
    WScript.Quit
End If

FullPath = WScript.Arguments(0)
i = InstrRev(FullPath, "\")
Name = Mid(FullPath, i + 1)
Directory = Left(FullPath, i)

i = InstrRev(Name, ".")
If i <> 0 Then Name = Left(Name, i - 1)

Set Sh = CreateObject("WScript.Shell")

Cmd = "JSC.EXE /w:4 /t:exe /debug "
For i = 1 To WScript.Arguments.Count - 1
    Cmd = Cmd & " " & WScript.Arguments(i)
Next
Cmd = Cmd & " " & FullPath

WScript.Echo Cmd

Set JSC = Sh.Exec(Cmd)

While Not JSC.StdOut.AtEndOfStream
    WScript.Echo JSC.StdOut.ReadLine
WEnd

If JSC.ExitCode <> 0 Then WScript.Quit

Cmd = "PEVerify.EXE " & Directory & Name & ".exe"

WScript.Echo Cmd

Set PEVerify = Sh.Exec(Cmd)

While Not PEVerify.StdOut.AtEndOfStream
    WScript.Echo PEVerify.StdOut.ReadLine
WEnd