title: Search string in file and print next 5th line in file using autoit
body: <p>I have a text file contains nearly 20 lines wanted to search a string in file and print next 5th line in file using autoit, any one can help me to solve this</p>
  
  <pre><code>#include &lt;File.au3&gt;
  #include &lt;array.au3&gt;
  
  
  $file = @ScriptDir &amp; "\file.txt"
  $search = "str"
  
  If FileExists($file) Then
      $contents = FileRead($file)
      If @error Then
          MsgBox(0, 'File Error', $file &amp; ' could not be read.')
      Else
          For $i = 1 To $count
              If StringInStr($contents, $search) Then        
                  MsgBox(0, 'Positive', $file &amp; ' does contain the text "' &amp; $search &amp; '"')
              Else
                  MsgBox(0, 'Negative', $file &amp; ' does NOT contain the text "' &amp; $search &amp; '"')
              EndIf
          Next
      EndIf
  EndIf
  </code></pre>