Well, I didn't get the point of that code.
Anyway - I tried to, hence reformulated your code, hoping to get that point.
I still don't know for sure what it is doing, or should be doing... but at least it's looking a bit cleaner now... wink And, if I made no errors while reformulating, it should still return the same results.
Code:
alias rettime {
  var %dir = C:\program files\mirc3\files\
  var %read = $readini(playlist.ini,playlist,playlist)
  var %num = $calc($sound($file($gettok($+(%dir,%read),1-2,58)).shortfn).length / 60000)
  var %tok = $gettok($round($calc($round(0. $+ $gettok(%num,2,46),2) * 0.6),2),2,46)

  var %a = $gettok(%num,1,46)
  var %b = $iif(($len(%tok) == 1),$+(%tok,0),%tok)
  if ($len(%b) == 0) { var %b = 00 }

  return $+($chr(91),%a,:,%b,$chr(93))
}

I do post this for all the scripting newfolk out there, to demonstrate how important some code streamlining / -management could be... it's just like 2 + 2 cool

Last edited by Horstl; 14/08/07 03:06 AM.