Originally Posted By: MadSc13n41s4
Thanks a ton! So, here's the technical part. How would I read back the 5 highest incremented numbers out of an .ini?


here's a simple and quick method:

Code:
; /top5

alias top5 {

  if ($window(@top5)) window -c @top5
  window -h @top5

  var %i = 1
  while ($ini(blah.ini, %i)) {
    aline @top5 $v1 $+ : $readini(blah.ini, $v1, lines)
    inc %i
  }

  filter -wwteuc 2 32 @top5 @top5

  var %i = 1, %out
  while (%i <= 5) {
    %out = %out $+ , $line(@top5, %i)
    inc %i
  }

  window -c @top5
  echo -eag $mid(%out, 3)
}


first add nick & line values to a window named @top5 using a loop with $ini / $readini, sort that window with /filter, then collect the first 5 lines with a second loop.


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde