标题: [问题求助] VBS的TLI.TLIApplication怎么准确显示属性和方法? [打印本页]
作者: czjt1234 时间: 2013-5-9 12:01 标题: VBS的TLI.TLIApplication怎么准确显示属性和方法?
如果对象能响应事件,这个可以读取所有事件名- Set objTLIApplication = CreateObject("TLI.TLIApplication")
- Set objSWbemSink = Wscript.CreateObject("WbemScripting.SWbemSink", "Sink_")
- Set objTypeInfo = objTLIApplication.ClassInfoFromObject(objSWbemSink)
- s = ""
- Set objInterfaceInfo = objTypeInfo.DefaultEventInterface
- Set objMembers = objInterfaceInfo.Members '如果对象没有事件,这行会报错
- For Each objMemberInfo In objMembers
- s = s & objMemberInfo.Name & vbCrLf
- Next
- Msgbox s
复制代码
但是读取属性和方法时,发现有多余的显示和重复显示
请问为什么会有多余和重复
怎么区分哪个是属性哪个是方法?- Set objDictionary = CreateObject("Scripting.Dictionary")
- Set objTLIApplication = CreateObject("TLI.TLIApplication")
- Set objTypeInfo = objTLIApplication.ClassInfoFromObject(objDictionary)
- s = ""
- Set objInterfaceInfo = objTypeInfo.DefaultInterface
- Set objMembers = objInterfaceInfo.Members
- For Each objMemberInfo In objMembers
- s = s & objMemberInfo.Name & vbCrLf
- Next
- Msgbox s
复制代码
欢迎光临 批处理之家 (http://bathome.net./) |
Powered by Discuz! 7.2 |