mIRC Homepage
i have this code:
Code:
alias  m.imdb {
  .fopen imdb imdb.txt
  if $ferr { echo -a read error | fclose imdb | return }
  .fseek -w imdb *Titles (Partial Matches)*
  if !$feof && !$ferr {
    while $fread(imdb) != </ol> {
      var %a = $v1
      if *Titles (Partial Matches)* iswm %a { blah blah stuff }
      else  blah blah or else stuff   }
  }
  .fclose imdb
}
  


with this code it returns all the results found under the match. but if theres like over 200 results that come up, it gets kinda overloaded. so is there anyway to have it limit the results to somewhere aound 50 results..???

any info on this will be appreciated ...
thanks
this could be done with two ways..
1st: use filter and check for $filtered
2nd: set a variable on 1 and keep it increasing til it reaches 50

Code:
alias  m.imdb {
   [color:red]var %limit[/color]
  .fopen imdb imdb.txt
  if $ferr { echo -a read error | fclose imdb | return }
  .fseek -w imdb *Titles (Partial Matches)*
  if !$feof && !$ferr {
    while $fread(imdb) != </ol> {
      var %a = $v1
      [color:red]if (%limit = 50) break[/color] 
      [color:red]inc %limit[/color] 
      if *Titles (Partial Matches)* iswm %a { blah blah stuff }
      else  blah blah or else stuff   }
  }
  .fclose imdb
}
thanks b1ink, that worked perfectly... cool
© mIRC Discussion Forums