class LogRead __New LogWay _size this LogWay LogWay this sizeLast _siz

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
class LogRead
{
__New(LogWay, _size := 0)
{
this.LogWay := LogWay
this.sizeLast := _size
}
getLastStr()
{
newArray := []
FileRead, temp_text, % this.LogWay
logNew := StrSplit(temp_text, "`r`n")
if(logNew.Length() <= this.sizeLast)
{
this.sizeLast := logNew.Length()
Return
}
Loop, % logNew.Length() - this.sizeLast
newArray.Push(logNew[A_Index + this.sizeLast])
this.sizeLast := logNew.Length()
Return newArray
}
}