For all you mIRC scripting newfolk out there, you may learn something from this.

I recoded the script, looks like this now
Quote:
while (!$findfile(C:\program files\mirc3\files\,$gettok($read(songrequest.txt,1),%a,58),1)) && ($findfile(C:\program files\mirc3\,songrequest.txt,1)) {
if ($deltok($read(songrequest.txt,1),%a,58) != $null) { write -c songrequest.txt $deltok($read(songrequest.txt),%a,58) }
else { remove songrequest.txt }
}

Basically when I had just while (!$findfile(C:\program files\mirc3\files\,$gettok($read(songrequest.txt,1),%a,58),1)) { it was running the loop while there was an invalid filename in the %a token AND while a $null was returned, meaning the file wasn't there. Since the script deletes songrequest.txt, I had to make it run the loop only while it could find the file.

See, kids, its as easy as 1, 2,
Quote:
alias rettime {
var %a $gettok($calc($calc($sound($file($gettok(C:\program files\mirc3\files\ $+ $readini(playlist.ini,playlist,playlist),1-2,58)).shortfn).length / 1000) / 60),1,46)
if ($len($gettok($round($calc($round(0. $+ $gettok($calc($calc($sound($file($gettok(C:\program files\mirc3\files\ $+ $readini(playlist.ini,playlist,playlist),1-2,58)).shortfn).length / 1000) / 60),2,46),2) * 0.6),2),2,46)) == 1) { var %b $gettok($round($calc($round(0. $+ $gettok($calc($calc($sound($file($gettok(C:\program files\mirc3\files\ $+ $readini(playlist.ini,playlist,playlist),1-2,58)).shortfn).length / 1000) / 60),2,46),2) * 0.6),2),2,46) $+ 0 }
else { var %b $gettok($round($calc($round(0. $+ $gettok($calc($calc($sound($file($gettok(C:\program files\mirc3\files\ $+ $readini(playlist.ini,playlist,playlist),1-2,58)).shortfn).length / 1000) / 60),2,46),2) * 0.6),2),2,46) }
if ($len(%b) == 0) { var %b 00 }
return $chr(91) $+ %a $+ : $+ %b $+ $chr(93)
}

THATS NOTHING!!! ITS LIKE, 2+2!!