Hey, its me again. This time im having problems with my mp3 player coding. I cant get it so that when i open the dialog that the songs appear in the list with the .mp3 extension on them, i can get them to appear without it, but then they dont play. Im also having problems with my new change directory code, my random play code, and my continous play code. Whenever i try to change directories, my script freezes.
Heres the change directory coding.
alias changedir {
set %dir $sdir="Select Directory To Add"
did -r xmp3 1
did -r xmp3 50
set %amount.mp3 = $findfile(%dir,*.mp3,0,did -a xmp3 1 $nopath($1-))
set %mp3.x 1
while (%mp3.x <= %amount.mp3) { write mp3list.txt $findfile(%dir,*.mp3,%mp3.x)
inc %mp3.x
}
}
This is the dialog init code.
alias doinit {
did -ra mp3 50 %dir
$findfile(%dir,*.mp3,0,did -a xmp3 1 $remove($nopath($1-),.mp3))
}
This is the random play code.
alias randplay {
if ($calc(%mus.cur + 1) <= $lines($mircdirmp3list.txt)) {
var %x = $rand(1,$lines($mircdirmp3list.txt))
var %y = $findfile(%dir,*.mp3,%x)
mp3chan
}
}
This is the continous play code.
alias contplay {
if ($calc(%mp3 + 1) <= $lines($mircdirmp3list.txt)) {
/inc %mp3
var %x = $calc(%mp3 + 1)
var %y = $findfile(%dir,*.mp3,%x)
set %mp3 %y
/splay %dir $+ $read($mircdirmp3list.txt,%mp3)
mp3chan
}
}
Thanks,
--SpAzZ--