Set TLI = WScript.CreateObject("TLI.TLIApplication")
Set oTypeInfos = TLI.TypeLibInfoFromFile("wshom.ocx").TypeInfos
on error resume Next
For Each oTypeInfo In oTypeInfos
For Each oMember In oTypeInfo.Members
s = s & oMember.Name & ";" & oTypeInfo.Name & "." & oMember.Name & "("
param = ""
For Each oParameter In oMember.Parameters
Set oVarTypeInfo = oParameter.VarTypeInfo
sVarType = GetTypeName(oVarTypeInfo.VarType)
If param = "" Then
If oParameter.Optional Then
param = param & "[" & oParameter.Name & sVarType & "]"
Else
param = param & oParameter.Name & sVarType
End If
Else
If oParameter.Optional Then
param = param & "[, " & oParameter.Name & sVarType & "]"
Else
param = param & ", " & oParameter.Name & sVarType
End If
End If
Next
s = s & param & ")" & GetTypeName(oMember.ReturnType) & ";" & oMember.HelpString & vbCrLf
Next
Next
wscript.Echo s
Function GetTypeName(TliVarType)
Select Case TliVarType
Case 8192 : sTemp = "Array"
Case 70 : sTemp = "Object"
Case 11 : sTemp = "Boolean"
Case 8 : sTemp = "String"
Case Else
GetTypeName=""
Exit Function
End Select
GetTypeName = " As " & sTemp
End Function