; _ErrorCheckLog - Checks the last $numLines (int) lines of a log for occurances of $checkStr (string) ; If $checkStr (string) occurs $max (int) times, it returns True. Otherwise, it returns False. ; Requires: File.au3 Func _ErrorCheckLog($checkStr, $max, $numLines = $max) $loglines = _FileCountLines($aolog) $count = 0 If $loglines > $numLines+1 Then $loglines -= $numLines+1 $logfile = FileOpen($aolog, 0) FileReadLine($logfile, $loglines) If @error = 0 Then For $i = 1 to $numLines If StringInStr(FileReadLine($logfile), $checkStr) Then $count += 1 EndIf Next EndIf FileClose($logfile) If $count >= $max Then return True EndIf EndIf return False EndFunc