Ouvrez une vue de dossier, lancez cette application, cliquez sur init, il détecte toutes les instances. Il suffit de forer pour voir les propriétés des objets récursivement.
Vous pouvez désormais mettre à jour les propriétés et invoquer des méthodes sur l'exécution des instances!
Nom du fichier: dom_explorer.hta
Exigence: IE 5.5 (non testé sur IE5.1)
Auteur: Jean-Luc Antoine
Soumis: 31/10/2001
Mis à jour: 19/11/2001
Catégorie: HTA
N'oubliez pas: l'extension de fichier doit être * .hta
代码如下:
<html>
<adal>
<Title> Dom Explorer </Title>
<HTA: application
ApplicationName = "dom_explorer"
Border = "épais" borderstyle = "normal"
Légende = "oui" contextMenu = "Oui"
Id = "ohta" alert (ohta.applicationName);
Innerborder = "oui" maximiserbutton = "oui" minimiserbutton = "Oui"
Navigable = "non" scroll = "oui" scrollflat = "non"
Sélection = "oui" showintaskbar = "oui" singleinstance = "non"
Sysmenu = "oui" version = "0,5" windowState = "normal">
<Script Language = VBScript>
option explicite
Shapp Dim
set shapp = createObject ("shell.application")
Fonction Sp2 (nom, obj, rw, objpath) 'Propriétés
Sombre
Chaîne = "<tr> <td>"
Si isObject (obj) alors
Si obj n'est rien alors
Si Hidenull.
Sp2 = ""
fonction de sortie
Terminer si
Chaine = chaîne et nom
Elseif vartype (obj) = 0 alors
Chaine = chaîne et nom
Autre
Chaîne = chaîne & "<a href =" "#" "onclick = 'vbscript: showprop" & _
Objpath & "." & nom & "," "" & objpath & "." & nom &_
"" "'title ='" & objpath & "." & nom & "'>" & name & "</a>"
Terminer si
Autre
Chaine = chaîne et nom
Terminer si
Chaine = Chaine & "</td> <td>" & typename (obj) & "</td> <td>" & rw & "</td> <td>"
Sélectionner le vartype de cas (OBJ)
Cas 0'empty
Chaîne = chaîne & "<font color = red> non initialisé </font>"
Cas 1'null 'si isnull (obj) alors
Si Hidenull.
Sp2 = ""
fonction de sortie
Terminer si
Chaîne = chaîne & "<Font Color = Red> Aucune valeur </font>"
Cas 9'Object
Chaîne = chaîne & "<font color = red> ne peut pas afficher </font>"
Cas d'autre
Si rw = "lire / écrire" alors
Chaine = chaîne & "<span id =" "" & name & "" "ContentEtable = true> <b>" & _
Remplacer (obj, "<", "<") & "</b> </span> <a href = '#' onclick = 'vbscript:" & _
Objpath & "." & name & "="
Sélectionner le vartype de cas (OBJ)
'Cas 2'VBInteger - Cint ()
'Cas 3'vblong - clng ()