mIRC Home    About    Download    Register    News    Help

Print Thread
#62219 29/11/03 10:52 AM
Joined: Sep 2003
Posts: 29
S
sopia Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2003
Posts: 29
On dialog init, usualy it loads all the mp3files in the playlist. But I dont want it that way, I want to listen to only a few song that can be choosen from the sounds folder and put it in the playlist. Can this be done?. Some commands that I've seen was when you click a file to insert it in the playlist it will overwrite the one that is already in the playlist and only one file can be inserted. What I want is to insert more than one file and not all of it from the sounds folder.
on *:dialog:mp3player:init:*:{
if (%mp3.dir == $null) {
%mp3.dir = $sdir(Select Your Directory)
}
set %amout.mp3 $findfile(%mp3.dir,*.mp3,0)
var %x = 1
while (%x <= %amout.mp3) {
did -a $dname 2 $nopath($findfile(%mp3.dir,*.mp3,%x))
inc %x
}
}
I hope you understands what I meant. Thanks


Keep learning everyday, you'll be a genius.
#62220 30/11/03 11:09 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Suppose "2" is a listbox, you can use this command to add as many files as you want: //did -a mp3player 2 $sfile($mp3dir)

#62221 30/11/03 02:07 PM
Joined: Sep 2003
Posts: 29
S
sopia Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2003
Posts: 29
I dont want all file to be added, but to add only a few choosen one.
The insert file code I used:
alias mplayer.insert {
set %mplayer.file $file="Please Select A Media File ..." "C:\mirc\sounds\*.*"
if (%mplayer.file == $null) { return }
set %mplayer.file $shortfn(%mplayer.file)
if ($dialog(mplayer) != $null) {
did -a mplayer 2 $mplayer.entry(%mplayer.file)
did -a mplayer 3 00:00 / $mplayer.length($mp3(%mplayer.file).length)
}
return %mplayer.file
}
Whenever I insert a file it overwrite the existing file. Is there a way to make the existing files not being overwrite when I insert another file.
and the play code:
alias mplayer.play {
if ($dialog(mplayer) == $null) { return }
if ($1 != $null) || ($exists($1) == $true) {
set %mplayer.file $1
goto playfile
}
if (%mplayer.file == $null) { return }
:tongue:layfile
if (.mp3 !isin %mplayer.file) { did -b mplayer 5,9 }
else { did -e mplayer 5,9 }
splay %mplayer.file
did -a mplayer 2 $mplayer.entry(%mplayer.file)
did -a mplayer 3 00:00 / $mplayer.length($mp3(%mplayer.file).length)
return
}
Every time I click play it added the same file to the playlist. Is there a way not to make the file multiply when I click the play button?

Need Help. Thanks.


Keep learning everyday, you'll be a genius.

Link Copied to Clipboard