Func _ErrorCheckLog($checkStr, $max) $loglines = _FileCountLines($aolog) $count = 0 If $loglines > $max+1 Then $loglines -= $max+1 $logfile = FileOpen($aolog, 0) FileReadLine($logfile, $loglines) If @error = 0 Then For $i = 1 to $max If StringInStr(FileReadLine($logfile), $checkStr) Then $count += 1 EndIf Next EndIf FileClose($logfile) If $count >= $max Then return True Else return False EndIf EndIf EndFunc