Const ForReading = 1
Const ForAppend = 8
mySum = 0
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(Watch.GetJobFileName, ForReading)
Do Until objFile.AtEndOfStream
strLine = objFile.ReadLine
if(left(strLine,3) = "32B") then
mySum = mySum + CLng(mid(strLine,5))
End If
Loop
objFile.Close
Set objFile = objFSO.OpenTextFile(Watch.GetJobFileName, ForAppend)
objFile.Write ":99N:" & mySum
objFile.Close
_________________________
♪♫♪♫
99 frigging bugs in my code
99 frigging bugs
Take one down
Code around
127 frigging bugs in my code
♪♫♪♫