' start configuration strFolder = "./" ' end configuration ' setup file-constants Const ForWriting = 2 Const ForReading = 1 ' get fso(FileSystemObject) object Set fso = CreateObject("Scripting.FileSystemObject") ' get folder-object Set objFolder = fso.getFolder(strFolder) ' get files-collection Set objFiles = objFolder.Files ' open a file to write the result in Set objOpenFileForWrite = fso.OpenTextFile(strFolder & "getMethodsResult.txt", ForWriting, True) ' iterate through the files-collection For Each objFile In objFiles ' determine files with the extension .as Set objRegExp = New RegExp objRegExp.Pattern = "\.as$" objRegExp.IgnoreCase = True If objRegExp.Test(objFile.Name) Then ' *.as-file was found ' read the file Set objOpenFile = fso.OpenTextFile(objFile.Name, ForReading) strFile = objOpenFile.ReadAll objOpenFile.Close ' get matches in the file Set objRegExp = New RegExp objRegExp.Pattern = "([^ \n\t\.]*)[^ \t\n]*\.([^ \n\t$\.]+)( )*=( )*(function)( )*(\([^)]*\))" objRegExp.IgnoreCase = True objRegExp.Global = True Set matches = objRegExp.Execute(strFile) ' traverse through the matches-collection For Each match In matches ' get submatches strObjectName = match.SubMatches(0) strMethodName = match.SubMatches(1) strParams = match.SubMatches(6) ' write result objOpenFileForWrite.Write strMethodName & strParams & " // " & strObjectName & vbCRLF Next End If Next objOpenFileForWrite.Close