filename = "C:\getfunctionname.vbs"
Set fso = CreateObject("Scripting.FileSystemObject")
Set textFile = fso.OpenTextFile(filename, 1,false,-1 )
Do While not textFile.AtEndOfStream
tmptxt = trim(textFile.ReadLine)
If left(tmptxt,1)<> "'" Then
If instr(ucase(tmptxt),"FUNCTION")or instr(ucase(tmptxt),"SUB") Then
tmparr = split(tmptxt," ")
If ucase(tmparr(0)) = "FUNCTION" or ucase(tmparr(0)) = "SUB" Then
tmptxt = replace(tmptxt,tmparr(0),"")
tmptxt = trim(tmptxt)
tmparr2 = split(tmptxt,"(")
msgbox tmparr2(0)
End If
End If
End If
loop
用VBS獲取外部VBS函數庫中所有的方法名
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.