alias aplay {
var %i 1
if ($1 == -s) { /eplay $2- | halt }
if (!$exists($gettok($+(",$1-,"),1,64))) { echo -a 2* /aplay no such file | halt }
if (!$2) { echo -a 2* /aplay invalid paramaters | halt }
if ($lines($gettok($+(",$1-,"),1,64)) < 1) { echo -a 2* /aplay nothing to read | halt }
if (!$window($eval(@ $+ $gettok($1-,2,64),2)).x) { window -a $eval(@ $+ $gettok($1-,2,64),2) }
while (%i <= $lines($gettok($+(",$1-,"),1,64))) {
$iif(!$read($gettok($+(",$1-,"),1,64),%i),goto next,echo $eval(@ $+ $gettok($1-,2,64),2) $read($gettok($+(",$1-,"),1,64),n,%i))
:next
inc %i
}
}