Sub Process_Globals
End Sub
Sub AppStart (Args() As String)
For Each f As String In File.ListFiles("..\")
If f.EndsWith(".b4a") Then
Dim attributes As List
attributes.Initialize
Dim rx As RegexBuilder
rx.Initialize
rx.Append("#").StartCapture.AppendAnyBut(Array(":")).AppendAtLeastOne.EndCapture
rx.Append(":").Append(rx.CharWhitespace).AppendZeroOrMore
rx.StartCapture.Append(rx.CharAny).AppendZeroOrMore.EndCapture
For Each line As String In File.ReadList("..\", f)
If line.ToLowerCase.Contains("process_global") Then
Exit
End If
Dim m As Matcher = Regex.Matcher(rx.Pattern, line)
If m.Find Then
attributes.Add(m.Group(1) & ":" & m.Group(2))
End If
Next
File.WriteList("c:\temp", "attributes.txt", attributes) '<-- change as needed
End If
Next
End Sub