rendered paste bodydialog mp3 {
title "Mp3 Playlist Maker/Loader"
size -1 -1 300 300
option dbu
menu "&File",6
item "&Save Playlist",7
item "&View Playlists",8
item "&Load Playlist",9
text "Select Songs to add to playlist",4, 0 0 300 300, center
box "Songs",3,0 5 300 295
list 5,0 10 300 290,check
}
dialog savebox {
title "Save Playlist"
size -1 -1 200 50
option dbu
box "Enter playlist name",1, 0 0 200 50
edit "",2, 10 15 150 10
button "Save",3, 25 30 20 10
}
on *:dialog:mp3:*:*:{
/var %playlist = $did(mp3,5,1).seltext
/var %count = 1
/var %pltotal = $findfile(C:\Documents and Settings\Compaq_Owner\Programs\mIRC,*.mplf,0)
%songtotal = $findfile(C:\wamp\www\game\music,*.mp3,0)
if ($devent == init) {
while ( %songtotal >= %count ) {
/did -a mp3 5 $findfile(C:\wamp\www\game\music,*.mp3,%count)
%count = $calc( %count + 1 )
}
}
if ($devent == menu) {
if ($did == 7) { /dialog -m savebox savebox }
if ($did == 8) {
/did -r mp3 5
while (%count <= %pltotal) {
/did -a mp3 5 $findfile(C:\Documents and Settings\Compaq_Owner\Programs\mIRC,*.mplf,%count)
%count = $calc( %count + 1 )
}
}
if ($did == 9) { /load -rs " $+ %playlist $+ " | /dialog -x mp3 }
}
}
on *:dialog:savebox:*:*:{
/var %count = 1
if ($devent = sclick) {
if ($did == 3) {
/var %pfile = $did($dname,2).text
/write -c %pfile $+ .mplf on *:load:{
/write %pfile $+ .mplf splay -c
while (%count <= %songtotal) {
if ($did(mp3,5,%count).cstate == 1) { /write %pfile $+ .mplf /splay -q $did(mp3,5,%count).text }
inc %count }
/dialog -x mp3
/dialog -x savebox
/write %pfile $+ .mplf msg $active %pfile Playlist File Loaded
/write %pfile $+ .mplf unload -rs %pfile $+ .mplf
/write %pfile $+ .mplf $chr(125)
}
}
}
}
alias -l mp3 {
/dialog -m mp3 mp3
}