Open a folder view, launch this application, click on init, it detects all instances. Just drill-down to see the properties of the objects recursively.
You can now update properties and invoke methods on running instances !
File Name : DOM_Explorer.hta
Requirement : IE 5.5 (not tested on IE5.1)
Author : Jean-Luc Antoine
Submitted : 31/10/2001
Updated : 19/11/2001
Category : HTA
Remember : The file extension has to be *.HTA
Function SP2(name,obj,RW,ObjPath) 'Properties
Dim Chaine
Chaine="<TR><TD>"
If isobject(obj) Then
If obj is Nothing Then
If HideNull.Checked Then
SP2=""
exit function
End If
Chaine=Chaine & Name
ElseIf VarType(obj)=0 Then
Chaine=Chaine & Name
Else
Chaine=Chaine & "<a href=""#"" OnClick='vbscript:ShowProp " &_
ObjPath & "." & name & ",""" & ObjPath & "." & name &_
"""' title='" & ObjPath & "." & name & "'>" & name & "</a>"
End If
Else
Chaine=Chaine & Name
End If
Chaine=Chaine & "</TD><TD>" & typeName(obj) & "</TD><TD>" & RW & "</TD><TD>"
Select Case VarType(Obj)
Case 0 'Empty
Chaine=Chaine & "<font color=red>Uninitialized</font>"
Case 1 'Null 'If IsNull(Obj) Then
If HideNull.Checked Then
SP2=""
exit function
End If
Chaine=Chaine & "<font color=red>No value</font>"
Case 9 'Object
Chaine=Chaine & "<font color=red>Can't display</font>"
Case Else
If RW="Read/Write" Then
Chaine=Chaine & "<span ID=""" & name & """ contenteditable=true><b>" &_
Replace(obj,"<","<") & "</b></span> <a href='#' onclick='vbscript:" &_
ObjPath & "." & name & "="
Select Case VarType(Obj)
'Case 2 'vbInteger - CInt()
'Case 3 'vbLong - CLng()
'Case 4 'vbSingle - CSng()
'Case 5 'double - CDbl()
'Case 6 'vbCurrency - CCur()
Case 7 'vbDate
Chaine=Chaine & "CDate(" & name & ".innerText)"
'Case 8 'vbString - CStr()
'Case 10 'vbError
Case 11 'vbBoolean
Chaine=Chaine & "CBool(" & name & ".innerText)"
'Case 12 'vbVariant
'Case 13 'vbDataObject
'Case 14 'vbDecimal
'Case 17 'vbByte - CByte()
'Case 8192 'vbArray
Case Else
Chaine=Chaine & name & ".innerText"
End Select
Chaine=Chaine & "' title='Click here to update'>ok</a>"
Else
Chaine=Chaine & Replace(obj,"<","<")
End If
End Select
Chaine=Chaine & "</TD></TR>"
SP2=Chaine
End Function
Function SP(name,NbArg,ObjPath,Title) 'Methods
Dim Chaine,x
Chaine="<TR><TD>"
Chaine=Chaine & "<a href=""#"" OnClick='vbscript:" & ObjPath & "." & name
If NbArg>0 Then Chaine=Chaine & " " & Name & "1" & ".InnerText"
If NbArg>1 Then Chaine=Chaine & "," & Name & "2" & ".InnerText"
If NbArg>2 Then Chaine=Chaine & "," & Name & "3" & ".InnerText"
Chaine=Chaine & " ' title='" & Title & "'>" & name & "</a>"
Chaine=Chaine & "</TD><TD>"
If NbArg>0 Then Chaine=Chaine & "<Input type=Text Name=" & Name & "1>"
Chaine=Chaine & "</TD><TD>"
If NbArg>1 Then Chaine=Chaine & "<Input type=Text Name=" & Name & "2>"
Chaine=Chaine & "</TD><TD>"
If NbArg>2 Then Chaine=Chaine & "<Input type=Text Name=" & Name & "3>"
Chaine=Chaine & "</TD></TR>"
SP=Chaine
End Function
Function ShowFrames(obj,Depth)
Dim Chaine,x
on error resume next
x=obj.frames.length
Chaine =""
If x<>0 Then
'Chaine =x & vbCrLf
For x=0 To obj.frames.length-1
Chaine=Chaine & String(1+Depth*4," ")
Chaine=Chaine & obj.frames(x).name
Chaine=Chaine & obj.frames(x).Location & vbCrLF
Chaine=Chaine & ShowFrames(obj.frames(x).document,Depth+1)
Next
End If
ShowFrames=Chaine
End Function
Sub ShowProp(Obj,OP)
'Display the object's properties
Dim C,R,RW,x
R="Read"
RW="Read/Write"
x=InstrRev(OP,".")
If x>0 Then
C=Left(OP,x-1)
C="<a href=""#"" OnClick='vbscript:ShowProp " & C & ",""" & C &_
"""' title='" & C & "'>" & C & "</a><u>" & Mid(OP,x) & "</u>"
Else
C=OP
End If
C="Properties for " & C & " - TypeName : " & typeName(obj) & "<br><TABLE class=Prop>"
C=C & "<TR><TD>PropName</TD><TD>Type</TD><TD>Access</TD><TD>Value</TD></TR>"
Select Case TypeName(obj) 'See Microsoft HTML Object Librairy
Case "IShellDispatch3"
C=C & SP2("Application",obj.Application,R,OP)
C=C & SP2("Parent",obj.Parent,R,OP)
C=C & SP2("Windows",obj.Windows,R,OP)
C=C & SP("Open",1,OP,"Open a folder")
C=C & SP("Explore",1,OP,"Explore a folder")
C=C & SP("MinimizeAll",0,OP,"Minimize all windows")
C=C & SP("UndoMinimizeAll",0,OP,"Undo Minimize all windows")
C=C & SP("FileRun",0,OP,"Bring up the file run")
C=C & SP("CascadeWindows",0,OP,"Cascade Windows")
C=C & SP("TileVertically",0,OP,"Tile windows vertically")
C=C & SP("TileHorizontally",0,OP,"Tile windows horizontally")
C=C & SP("ShutdownWindows",0,OP,"Exit Windows")
C=C & SP("Suspend",0,OP,"Suspend the pc")
C=C & SP("EjectPC",0,OP,"Eject the pc")
C=C & SP("SetTime",0,OP,"Bring up the Set time dialog")
C=C & SP("Help",0,OP,"Display shell help")
C=C & SP("FindFiles",0,OP,"Find Files")
C=C & SP("FindComputer",0,OP,"Find a computer")

