alias /test { dialog -m test test | did -r test 1 | var %x = $findfile(%mp3dir,*mp3,0,did -a test 1 $nopath($1-)) }
alias f1 test

dialog test {
title "moo"
size -1 -1 121 57
option dbu
list 1, 4 2 50 50, size
list 2, 68 2 50 50, size
button ">>", 3, 55 3 13 12
button "ok", 4, 58 32 8 12, ok
}





on *:DIALOG:test:SCLICK:3: {
; find how many lines are selected
var %i = $did($dname,1,0).sel
var %j = 1
; loop through them while
(%j <= %i) {
did -a $dname 2 $did($dname,1,$did($dname,2,%j).sel)
inc %j
}
}

on *:dialog:test:sclick:*: {
if $did = 3 { .splay pause }
if $did = 4 { .splay stop }
if $did = 5 { .splay resume }
if $did = 6 { did -r test 11 | var %x = $read(system\mp3test.txt,did -a test 11 $nopath($1-)) | /foob }
}




alias foob {
var %x = 1, %max = $lines(system\mp3.txt)
while (%x <= %max) {
did -a mp3 2 $nopath($read(system\mp3.txt,%x))
inc %x
}
}

now i have this but it gives this error:
[04:07pm] [Unknown command (%J]