class LogRead __New LogWay this LogWay LogWay this sizeLast getLastStr

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
class LogRead
{
__New(LogWay)
{
this.LogWay := LogWay
this.sizeLast := 0
}
getLastStr()
{
FileGetSize, fileSize, % this.LogWay
if(fileSize <= this.sizeLast)
Return
file := FileOpen(this.LogWay, "r")
file.Seek(this.sizeLast)
fileText := file.Read()
file.Close()
this.sizeLast := fileSize
Return StrSplit(fileText, "`r`n")
}
}