Skip to content
MSN

mp3 player help

A TG007 community discussion started by SpAzZ.

Discussion 5 posts
Page 1 of 1
Open
Topic #1637 · 5 published posts · 692 views

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--

 

what i did was i put mines into a text file then worked it from there removing the path name and file exctension

Spam Honeypot - http://www.haggistech.co.uk/honey(humans do not register)

I cant get it 2 write to a file though, it freezes my script when i try to change directories.

--SpAzZ--

i cant mind

 

i will look out ma mp3 player and have a look for you

Spam Honeypot - http://www.haggistech.co.uk/honey(humans do not register)

thanks haggis

--SpAzZ--