alias -l tree {
var %dir = e:\
write -c temp.txt
if ($fopen(mp3list)) { .fclose mp3list }
.fopen mp3list temp.txt
var %x = $finddir($+(",%dir,"),*,0,2,.fwrite -n mp3list $1-)
.fclose mp3list
var %n = 1
did -a $dname 401 \Mp3s\
did -i $dname 401 1 cb root last 1
while (%n < $lines(temp.txt)) {
var %line = $read(temp.txt,%n)
if ($numtok(%line,92) <= 2) {
did -a $dname 401 $gettok(%line,2,58)
did -i $dname 401 1 cb root last 1
inc %n
}
if ($numtok(%line,92) >= 3) {
did -a $dname 401 $gettok(%line,2,58)
did -i $dname 401 1 cb root last last 1
inc %n
}
}
}
on *:dialog:mmp2:*:*:{
if ($devent == init) {
dll $mdx SetMircVersion $version
dll $mdx MarkDialog $dname
dll $mdx SetControlMDX $dname 401 TreeView haslines linesatroot hasbuttons autosort > $views
tree
}
}