Here's some basics:
(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
Dim fso
Dim path As String
Dim file
Dim txtLine As String
txtLine = ""
Function OpenLogFile ()
On Error GoTo ErrHandler
Set fso = COM.CreateCOMObject("Scripting.FileSystemObject")
path = root.GetExhumeDirectory & "\VGLogDump.log"
Set file = fso.opentextfile(path, 1)
'lets loop through all the old stuff and get to the end of the file before we start generating new content
Do Until file.AtEndOfStream
txtLine = file.ReadLine
Loop
'Now enable the chatlog in preparation for new content
EnableChatLog
OpenLogFile = True
Exit Function
ErrHandler:
OpenLogFile = False
End Function
and to loop through the chatlog once it's open:
(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
Do Until file.AtEndOfStream
txtLine = file.ReadLine
If InStr(txtLine, "Crafting recipe selected") Then
bCraftStart = True
End If
Loop
after each file.Readline, it reads a new line of the chatlog for you to run your checks against (in my case, I was checking if the string held "Crafting Recipe Selected").