music player mp3 wma and wav

Platform:  mIRC
Published  Aug 10, 2008
Updated  Oct 20, 2008
ok so i was sick of my old mp3 player coz i couldnt play my wma or wav files so i come up with this one.

brief description:
-plays mp3 wma or wav files
-add either a folder of music or individual files and the option to delete your whole list or a single file
-choose which chans to spam to and which not to
-scrolling volume control and mute
-normal random and loop play modes ( and Next Track and Last Track buttons )
-12 themes so far including No Theme ( i will be having 24 all together )
-displays track name, track length, track # in your list, volume, play mode, and playing to (spamming to) in the "track info" section


to make your list click: (your list = a folder of music, or you can add individual files.)
File--List Options--Add Folder OR Add File,
right click any grey area of the dialog,
double click the white box Or
click play, random or loop
NOTE:a dialog will pop up asking "file or folder", type:
file
or
folder
according to what you would like to add.

i will update with more themes,
but any theme suggestions will be welcome.

Added:
-menu ( just placed it everywhere so it was easy to find )
-scrolling volume control
-current theme preview on themes tab ( i did not choose to use $stript() in most as i have 3 as <<<<>>>> just diff colors, so i left color codes in. )
-next and last track buttons
-on load and unload events to unset variables ( so if your newer to mirc scripting and you wonder what the thing that pops up is, it is just letting you know the script wants to set some variables.so click yes. )
-rclick event to make list ( however cant be selected from in the listbox, dont know why yet.
-if no directory exists you can now click play,random or loop and it will prompt you to select a folder.
-gender variable ( used as "his" or "her" in some themes )
-track number in track info section
-add folder, add file, open list as .txt to "file" menu
-version check( if using mirc 6.16 or less the script will auto unload itself.

Fixed:
-splay error msgs when clicking play
a: when no song is seleceted
b: when no list exists
-splay error msgs when clicking random or loop and no list exists
-Folder add bug ;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------14
*************************************
*PuNkTuReD's Sound Pro Music Player.*
* Plays mp3 wav and wma files. *
*************************************
menu * {
music player:dialog -dm music.player music.player
}
;--------------------------------------------------------------------------------------------------------------Sound Pro Dialog
dialog music.player {
title "† Sound Pro - V 1.0.1 . . ."
size -1 -1 250 200
option dbu
;-------------------------------------------------------Track List
box "Track List", 1, 2 2 246 80
list 2, 4 10 242 70, size, vsbar, hsbar, radio,
;-------------------------------------------------------Track Info
box "Current Track Info", 3, 2 82 246 40
text "Track Name:" 4, 6 90 30 8
text "No Track Playing", 5, 6 98 153 14
text "Track Length:" 10, 211 90 50 8
text "", 11, 208 98 38 8
text "Track #:" 18, 168 90 24 8
text "", 19, 189 90 15 8
text "Volume:", 12, 6 113 20 8
text "100%", 13, 26 113 30 8
text "Playing To:", 14, 197 113 30 8
text "", 15, 225 113 20 8
text "Play Mode:", 16, 147 113 28 8
text "", 17, 175 113 22 8
;-------------------------------------------------------Main Controls Tab 100
tab "+ Main Controls", 100, 2 123 246 75
button "Play", 101, 7 138 30 10, tab 100
button "Pause", 102, 7 148 30 10, tab 100
button "Resume", 103, 95 138 30 10, tab 100
button "Stop", 104, 95 148 30 10, tab 100
button "Next Track", 105, 130 138 35 10, tab 100
button "Last Track", 106, 130 148 35 10, tab 100
text "Volume Control:", 107, 171 140 45 8, tab 100
scroll "", 108, 169 150 76 8, horizontal, range 00000 65535, tab 100
radio "Mute", 111, 217 140 27 8, tab 100
radio "Random Play", 112, 45 139 40 8, tab 100
radio "Loop Play", 113, 45 150 40 8, tab 100
;-------------------------------------------------------Spam Options Tab 200
tab "+ Spam Options", 200, 2 123 246 75
text "Available Channels:", 202, 6 140 50 8, tab 200
list 201, 4 149 118 30, size, vsbar, tab 200
text "Custom List:", 204, 129 140 50 8, tab 200
list 203, 127 149 118 30, size, vsbar, tab 200
text "Play To:", 205, 6 184 30 8, tab 200
radio "All", 206, 36 184 30 8, tab 200
radio "Custom", 207, 68 184 30 8, tab 200
radio "None", 208, 100 184 30 8, tab 200
button "Clear List", 209, 213 184 30 10, tab 200
button "Remove Chan", 210, 171 184 40 10, tab 200
button "Add Chan", 211, 129 184 40 10, tab 200
;-------------------------------------------------------Theme Options Tab 300
tab "+ Theme Center", 300, 2 123 246 75
radio "Theme 1", 302, 9 153 35 8, tab 300
radio "Theme 2", 303, 48 153 35 8, tab 300
radio "Theme 3", 304, 87 153 35 8, tab 300
radio "Theme 4", 305, 126 153 35 8, tab 300
radio "Theme 5", 306, 165 153 35 8, tab 300
radio "Theme 6", 307, 204 153 35 8, tab 300
radio "Theme 7", 308, 9 163 35 8, tab 300
radio "Theme 8", 309, 48 163 35 8, tab 300
radio "Theme 9", 310, 87 163 35 8, tab 300
radio "Theme 10", 311, 126 163 35 8, tab 300
radio "Theme 11", 312, 165 163 35 8, tab 300
radio "No Theme", 313, 204 183 35 8, tab 300

text "Current Theme:", 314, 6 140 40 8, tab 300
text "", 315, 46 140 200 8, tab 300
box "", 316, 4 145 242 50, tab 300

radio "Theme 12", 317, 204 163 35 8, tab 300
radio "Theme 13", 318, 9 173 35 8, tab 300
radio "Theme 14", 319, 48 173 35 8, tab 300
radio "Theme 15", 320, 87 173 35 8, tab 300
radio "Theme 16", 321, 126 173 35 8, tab 300
radio "Theme 17", 322, 165 173 35 8, tab 300
;radio "Theme 18", 323, 204 153 35 8, tab 300
;-------------------------------------------------------Features tab 100
text "Features:", 400, 8 162 40 8, tab 100
text "Play Modes - Normal, Random and Loop.", 401, 8 170 100 8, tab 100
text "Volume Control - Scrollbar and Mute.", 402, 8 178 110 8, tab 100
text "Spam Options - All, Custom and None.", 403, 117 170 100 8, tab 100
text "Theme Center - 22 Themes to choose from.", 404, 117 178 110 8, tab 100
box "", 405, 4 158 242 30, tab 100
link "http://www.punktured.eexweb.com", 499, 22 190 100 8, tab 100
link "http://www.hawkee.com/snippet/4866/", 512, 130 190 100 8, tab 100
;-------------------------------------------------------Menu
menu "File", 500
menu "List Options", 501, 500
item "Add Folder", 502, 501
item "Add File", 505, 501
item break, 506, 501
item "Remove Selected", 507, 501
item break, 508, 501
item "Open List As .txt", 504, 501
item "Clear List", 503, 501
item break, 515, 500
item "Close", 509, 500, cancel
menu "Extras", 510
item "Advertise Sound Pro", 511, 510
item "Set Gender: His/Her", 513, 510
item "Close and Stop Track", 514, 500
}
on 1:waveend: {
if (%random == on) {
set %playing $read(MyPlaylist.txt)
splay %playing
set %songnumber $readn
did -u music.player 2
set %playing $nopath($insong.fname)
if (.mp3 isin %playing) || (.wma isin %playing) {
set %playing $nopath($insong.fname)
set %length $gmt($round($calc($insong.length / 1000),0),nn:ss)
did -ra music.player 5 %playing
did -s music.player 2 $($+(%,songnumber),2)
did -ra music.player 11 $replace($($+(%,length),2),:,Mins:) $+ Secs
spam
}
if (.wav isin %playing) { set %playing $nopath($inwave.fname) | set %length $gmt($round($calc($inwave.length / 1000),0),nn:ss) | did -s music.player 2 $($+(%,songnumber),2) | did -ra music.player 5 %playing | did -ra music.player 11 $replace($($+(%,length),2),:,Mins:) $+ Secs | spam }
}
if (%loop == on) {
if (.mp3 isin %playing) || (.wma isin %playing) {
inc %songnumber
splay $read(MyPlaylist.txt, %songnumber)
set %playing $nopath($insong.fname)
set %length $gmt($round($calc($insong.length / 1000),0),nn:ss)
did -u music.player 2
did -s music.player 2 $($+(%,songnumber),2)
did -ra music.player 5 %playing
did -ra music.player 11 $replace($($+(%,length),2),:,Mins:) $+ Secs
spam
}
if (.wav isin %playing) {
inc %songnumber
splay $read(MyPlaylist.txt, %songnumber)
set %playing $nopath($insong.fname)
set %length $gmt($round($calc($inwave.length / 1000),0),nn:ss)
did -u music.player 2
did -s music.player 2 $($+(%,songnumber),2)
did -ra music.player 5 %playing
did -ra music.player 11 $replace($($+(%,length),2),:,Mins:) $+ Secs
spam
}
}
if (%random == off) && (%loop == off) { did -r music.player 19 N/A | set %playing No Song Playing | set %length 00:00 | did -ra music.player 11 $replace($($+(%,length),2),:,Mins:) $+ Secs | did -ra music.player 5 %playing }
}

on *:mp3end: {
if (%random == on) {
set %playing $read(MyPlaylist.txt)
splay %playing
set %songnumber $readn
did -u music.player 2
set %playing $nopath($insong.fname)
if (.mp3 isin %playing) || (.wma isin %playing) {
set %playing $nopath($insong.fname)
set %length $gmt($round($calc($insong.length / 1000),0),nn:ss)
did -ra music.player 5 %playing
did -s music.player 2 $($+(%,songnumber),2)
did -ra music.player 11 $replace($($+(%,length),2),:,Mins:) $+ Secs
spam
}
if (.wav isin %playing) { set %playing $nopath($inwave.fname) | set %length $gmt($round($calc($inwave.length / 1000),0),nn:ss) | did -s music.player 2 $($+(%,songnumber),2) | did -ra music.player 5 %playing | did -ra music.player 11 $replace($($+(%,length),2),:,Mins:) $+ Secs | spam }
}
if (%loop == on) {
if (.mp3 isin %playing) || (.wma isin %playing) {
inc %songnumber
splay $read(MyPlaylist.txt, %songnumber)
set %playing $nopath($insong.fname)
set %length $gmt($round($calc($insong.length / 1000),0),nn:ss)
did -u music.player 2
did -s music.player 2 $($+(%,songnumber),2)
did -ra music.player 5 %playing
did -ra music.player 11 $replace($($+(%,length),2),:,Mins:) $+ Secs
spam
}
if (.wav isin %playing) {
inc %songnumber
splay $read(MyPlaylist.txt, %songnumber)
set %playing $nopath($insong.fname)
set %length $gmt($round($calc($inwave.length / 1000),0),nn:ss)
did -u music.player 2
did -s music.player 2 $($+(%,songnumber),2)
did -ra music.player 5 %playing
did -ra music.player 11 $replace($($+(%,length),2),:,Mins:) $+ Secs
spam
}
}
if (%random == off) && (%loop == off) { did -r music.player 19 N/A | set %playing No Song Playing | set %length 00:00 | did -ra music.player 11 $replace($($+(%,length),2),:,Mins:) $+ Secs | did -ra music.player 5 %playing }
}
on *:dialog:music.player:menu:*: {
;-------------------------------------------------------Add Del Directory
if $did = 502 { set %dir $sdir="Music Directory" | did -r music.player 2 | noop $findfile(%dir,*.mp3;*.wav;*.wma,0,write MyPlaylist.txt $1-) | play.list }
if $did = 503 { unset %dir | did -r music.player 2 | write -c MyPlaylist.txt }
if $did = 504 { run MyPlaylist.txt }
if $did = 505 { add.file }
if $did = 507 { set -u2 %temp.num $did(music.player,2,1).sel | did -d music.player 2 %temp.num | //write -dl $+ %temp.num MyPlaylist.txt }
;-------------------------------------------------------Advertise
if $did = 511 { advertise.player }
;-------------------------------------------------------Gender
if $did = 513 { set %music.gender $?"his OR her" }
;-------------------------------------------------------Close and stop music
if $did = 514 {
splay stop
dialog -x music.player music.player
if (%random == ON) { set %random OFF | did -u music.player 112 }
if (%loop == ON) { set %loop OFF | did -u music.player 113 }
}
}
on *:dialog:music.player:sclick:*: {
;-------------------------------------------------------Play Pause Resume Stop
if $did = 101 {
if (%dir == $null) && ($did(music.player,2).seltext == $null) { dialog -dm add.list add.list | halt }
if ($did(music.player,2).seltext == $null) { echo -a 4Please select a song to play. | halt }
if (%random == ON) { did -u music.player 112 | set %random OFF }
if (%loop == ON) { did -u music.player 113 | set %loop OFF }
did -ra music.player 17 Normal
splay stop
set %random OFF
set %loop OFF
set %songnumber $did(music.player,2).sel
set %song $read(MyPlaylist.txt, $($+(%,songnumber),2))
splay %song
set %playing $did(music.player,2).seltext
if (.mp3 isin %playing) || (.wma isin %playing) {
set %length $gmt($round($calc($insong.length / 1000),0),nn:ss)
did -ra music.player 5 %playing
did -ra music.player 11 $replace($($+(%,length),2),:,Mins:) $+ Secs
spam
}
else {
set %length $gmt($round($calc($inwave.length / 1000),0),nn:ss)
did -ra music.player 5 %playing
did -ra music.player 11 $replace($($+(%,length),2),:,Mins:) $+ Secs
spam
}
}
if $did = 102 { splay pause }
if $did = 103 { splay resume }
if $did = 104 { did -ra music.player 19 N/A | did -u music.player 2 | did -s music.player 2 | did -s music.player 2 1 | did -u music.player 112,113 | did -ra music.player 17 Normal | set %random OFF | set %loop OFF | set %playing No Track Playing | set %length 00:00 | splay stop | did -ra music.player 5 %playing | did -ra music.player 11 $replace($($+(%,length),2),:,Mins:) $+ Secs }
;-------------------------------------------------------next last songs
if $did = 105 {
set %now %songnumber
did -u music.player 2
set %now $calc($($+(%,songnumber),2) + 1)
set %songnumber %now
did -s music.player 2 %now
did -c music.player 2 %now
set %playing $did(music.player,2).seltext
splay $read(MyPlaylist.txt, %now)
if (.mp3 isin %playing) || (.wma isin %playing) {
set %length $gmt($round($calc($insong.length / 1000),0),nn:ss)
did -ra music.player 5 %playing
did -ra music.player 11 $replace($($+(%,length),2),:,Mins:) $+ Secs
spam
}
else {
set %length $gmt($round($calc($inwave.length / 1000),0),nn:ss)
did -ra music.player 5 %playing
did -ra music.player 11 $replace($($+(%,length),2),:,Mins:) $+ Secs
spam
}
}
if $did = 106 {
set %now %songnumber
did -u music.player 2
set %now $calc($($+(%,songnumber),2) - 1)
set %songnumber %now
did -s music.player 2 %now
did -c music.player 2 %now
set %playing $did(music.player,2).seltext
splay $read(MyPlaylist.txt, %now)
if (.mp3 isin %playing) || (.wma isin %playing) {
set %length $gmt($round($calc($insong.length / 1000),0),nn:ss)
did -ra music.player 5 %playing
did -ra music.player 11 $replace($($+(%,length),2),:,Mins:) $+ Secs
spam
}
else {
set %length $gmt($round($calc($inwave.length / 1000),0),nn:ss)
did -ra music.player 5 %playing
did -ra music.player 11 $replace($($+(%,length),2),:,Mins:) $+ Secs
spam
}
}
;-------------------------------------------------------Vol
if $did = 111 {
if (%vol == 00000) {
if (%random == on) { set %vol 50000 | vol -u2v | vol -v %vol | did -ra music.player 13 %vol | did -c music.player 108 $($+(%,vol),2) | did -ra music.player 111 Mute | did -u music.player 111 | did -c music.player 112 }
if (%loop == on) { set %vol 50000 | vol -u2v | vol -v %vol | did -ra music.player 13 %vol | did -c music.player 108 $($+(%,vol),2) | did -ra music.player 111 Mute | did -u music.player 111 | did -c music.player 113 }
if (%random == OFF) && (%loop == OFF) { set %vol 50000 | vol -u2v | vol -v %vol | did -ra music.player 13 %vol | did -c music.player 108 $($+(%,vol),2) | did -ra music.player 111 Mute | did -u music.player 111 }
}
else {
if (%random == on) { set %vol 00000 | vol -u1v | did -ra music.player 13 Mute | did -c music.player 108 $($+(%,vol),2) | did -ra music.player 111 UnMute | did -c music.player 112 }
if (%loop == on) { set %vol 00000 | vol -u1v | did -ra music.player 13 Mute | did -c music.player 108 $($+(%,vol),2) | did -ra music.player 111 UnMute | did -c music.player 113 }
if (%random == OFF) && (%loop == OFF) { set %vol 00000 | vol -u1v | did -ra music.player 13 Mute | did -c music.player 108 $($+(%,vol),2) | did -ra music.player 111 UnMute | did -u music.player 111 }
}
}
;-------------------------------------------------------Spam
if $did = 206 { set %spam.to //ame | did -ra music.player 15 All }
if $did = 207 { set %spam.to Custom | did -ra music.player 15 Custom }
if $did = 208 { set %spam.to //echo -a | did -ra music.player 15 None }
if $did = 209 { did -r music.player 203 | write -c CustomChanPlayList.txt }
;-------------------------------------------------------random
if $did = 112 {
if (%dir == $null) && ($did(music.player,2).seltext == $null) { dialog -dm add.list add.list | halt }
did -ra music.player 17 Random
did -u music.player 2 %songnumber
splay stop
set %loop off
set %random on
splay $read(MyPlayList.txt)
set %songnumber $readn
did -c music.player 2 %songnumber
set %playing $nopath($insong.fname)
set %length $gmt($round($calc($insong.length / 1000),0),nn:ss)
did -s music.player 2 $($+(%,songnumber),2)
did -ra music.player 5 %playing
did -ra music.player 11 $replace($($+(%,length),2),:,Mins:) $+ Secs
spam
if (%vol == mute) { did -c music.player 111 }
}
;-------------------------------------------------------loop
if $did = 113 {
if (%dir == $null) && ($did(music.player,2).seltext == $null) { dialog -dm add.list add.list | halt }
splay stop
did -ra music.player 17 Loop
did -u music.player 2 %songnumber
set %loop on
set %random off
set %songnumber 1
did -c music.player 2 %songnumber
splay $read(MyPlayList.txt, %songnumber)
did -s music.player 2 $($+(%,songnumber),2)
set %playing $nopath($insong.fname)
set %length $gmt($round($calc($insong.length / 1000),0),nn:ss)
did -ra music.player 5 %playing
did -ra music.player 11 $replace($($+(%,length),2),:,Mins:) $+ Secs
spam
if (%vol == mute) { did -c music.player 111 }
}
;-------------------------------------------------------Themes
;--Row 1
if $did = 302 { set %themenumber 1 | set %theme1 4,1>14,1>15,1>0,1>4 | set %theme2 0,1<15,1<14,1<4,1< | did -ra music.player 315 %theme1 %theme2 | //echo -a %theme1 SongName %theme2 %theme1 SongLength %theme2 }
if $did = 303 { set %themenumber 2 | set %theme1 4,1<14,1<15,1<0,1<14 | set %theme2 0,1>15,1>14,1>4,1> | did -ra music.player 315 %theme1 %theme2 | //echo -a %theme1 SongName %theme2 %theme1 SongLength %theme2 }
if $did = 304 { set %themenumber 3 | set %theme1 4,1>7,1>8,1>0,1>4 | set %theme2 0,1<8,1<7,1<4,1< | did -ra music.player 315 %theme1 %theme2 | //echo -a %theme1 SongName %theme2 %theme1 SongLength %theme2 }
if $did = 305 { set %themenumber 4 | set %theme1 4,1<7,1<8,1<0,1<14 | set %theme2 0,1>8,1>7,1>4,1> | did -ra music.player 315 %theme1 %theme2 | //echo -a %theme1 SongName %theme2 %theme1 SongLength %theme2 }
if $did = 306 { set %themenumber 5 | set %theme1 6,1>6,1>13,1>13,1>13 | set %theme2 13,1<13,1<6,1<6,1< | did -ra music.player 315 %theme1 %theme2 | //echo -a %theme1 SongName %theme2 %theme1 SongLength %theme2 }
if $did = 307 { set %themenumber 6 | set %theme1 6,1<6,1<13,1<13,1<13 | set %theme2 13,1>13,1>6,1>6,1> | did -ra music.player 315 %theme1 %theme2 | //echo -a %theme1 SongName %theme2 %theme1 SongLength %theme2 }
;--Row 2
if $did = 308 {
set %themenumber 7
set %ass1 (_|_)
set %ass2 (_/_) (_|_) (_\_)
if (%music.gender == $null) { set %music.gender $input(His OR Her?,Settings,n,what is your gender?) }
if (%music.gender == his) { set %theme1 $rainbowtext(Shakes his) 12,1 $+ %ass1 $+ 11,1 | set %theme2 12,1 $+ %ass2 | did -ra music.player 315 $strip(%theme1 %theme2) | //echo -a %theme1 SongName %theme2 %theme1 SongLength %theme2 }
if (%music.gender == her) { set %theme1 $rainbowtext(Shakes her) 13,1 $+ %ass1 $+ 6,1 | set %theme2 13,1 $+ %ass2 | did -ra music.player 315 $strip(%theme1 %theme2) | //echo -a %theme1 SongName %theme2 %theme1 SongLength %theme2 }
}
if $did = 309 {
set %themenumber 8
set %hand1 4,1|..|, 14,1
set %hand2 4,1,|..|
set %theme1 4,1H14,1ea4,1DB14,1ang4,1Z %hand1 | set %theme2 12,1 $+ %hand2 | did -ra music.player 315 %theme1 %theme2 | //echo -a %theme1 14,1SongName %theme2 %theme1 14,1SongLength %theme2
}
if $did = 310 { set %themenumber 9 | set %theme1 4,1[14,1 | set %theme2 4,1] | did -ra music.player 315 %theme1 %theme2 | //echo -a %theme1 SongName %theme2 %theme1 SongLength %theme2 }
if $did = 311 { set %themenumber 10 | set %theme1 4>6,1>13,1>0,1>13,1 | set %theme2 0,1<13,1<6,1<4,1< | did -ra music.player 315 %theme1 %theme2 | //echo -a %theme1 SongName %theme2 %theme1 SongLength %theme2 }
if $did = 312 { set %themenumber 11 | set %theme1 4,1[12,1 | set %theme2 4,1] | did -ra music.player 315 %theme1 %theme2 | //echo -a %theme1 SongName %theme2 %theme1 SongLength %theme2 }
if $did = 313 { set %themenumber None | unset %theme1 | unset %theme2 | did -ra music.player 315 No Theme | //echo -a SongName SongLength }
if $did = 317 { set %themenumber 12 | set %theme1 4_(\7\/8/ | set %theme2 8\7\/4/)_ | did -ra music.player 315 %theme1 %theme2 | //echo -a %theme1 14,1SongName %theme2 %theme1 14,1SongLength %theme2 }
if $did = 318 { set %themenumber 13 | set %theme1 4,1xX14,1‡4,1Xx14,1 | set %theme2 4,1xX14,1‡4,1Xx | did -ra music.player 315 %theme1 %theme2 | //echo -a %theme1 14,1SongName %theme2 %theme1 14,1SongLength %theme2 }
if $did = 319 { set %themenumber 14 | set %theme1 5-4-5-14 | set %theme2 5-4-5- | did -ra music.player 315 %theme1 %theme2 | //echo -a %theme1 14,1SongName %theme2 %theme1 14,1SongLength %theme2 }
if $did = 320 { set %themenumber 15 | set %theme1 $rainbowtext(¯`·.¸¸¸.·´¯`·.¸¸¸.->) | set %theme2 $rainbowtext(<-.¸¸¸.·´¯`·.¸¸¸.·´¯) | did -ra music.player 315 $strip(%theme1 %theme2) | //echo -a %theme1 14,1SongName %theme2 %theme1 14,1SongLength %theme2 }
if $did = 321 { set %themenumber 16 | set %theme1 4(¯`·.¸¸¸.·´¯`·.¸¸¸.->14 | set %theme2 4<-.¸¸¸.·´¯`·.¸¸¸.·´¯) | did -ra music.player 315 $strip(%theme1 %theme2) | //echo -a %theme1 14SongName %theme2 %theme1 14SongLength %theme2 }

if $did = 210 { write -ds $did(music.player,203).seltext CustomChanPlayList.txt | did -r music.player 203
%a = 1
%b = $lines(CustomChanPlayList.txt)
while %a <= %b { did -a music.player 203 $read(CustomChanPlayList.txt, %a) | inc %a }
}
if $did = 211 { did -a music.player 203 $did(music.player,201).seltext | write CustomChanPlayList.txt $did(music.player,201).seltext }
}

;-------------------------------------------------------Double click in the playlist
on *:dialog:music.player:dclick:*: {
if $did = 2 {
if (%dir == $null) && ($did(music.player,2).seltext == $null) { dialog -dm add.list add.list | halt }
if (%random == OFF) && (%loop == OFF) {
did -ra music.player 17 Normal
set %random OFF
set %loop OFF
splay stop
set %songnumber $did(music.player,2).sel
set %song $read(MyPlaylist.txt, %songnumber)
splay %song
set %playing $did(music.player,2).seltext
if (.mp3 isin %playing) || (.wma isin %playing) {
set %length $gmt($round($calc($insong.length / 1000),0),nn:ss)
did -ra music.player 5 %playing
did -ra music.player 11 $replace($($+(%,length),2),:,Mins:) $+ Secs
spam
}
else {
set %length $gmt($round($calc($inwave.length / 1000),0),nn:ss)
did -ra music.player 11 %playing
did -ra music.player 11 $replace($($+(%,length),2),:,Mins:) $+ Secs
spam
}
}
if (%random == ON) {
did -u music.player 112
did -ra music.player 17 Normal
set %random OFF
set %loop OFF
splay stop
set %song $findfile(%dir,$did(music.player,2).seltext,1)
splay %song
set %playing $did(music.player,2).seltext
if (.mp3 isin %playing) || (.wma isin %playing) {
set %length $gmt($round($calc($insong.length / 1000),0),nn:ss)
did -ra music.player 5 %playing
did -ra music.player 11 $replace($($+(%,length),2),:,Mins:) $+ Secs
spam
}
else {
set %length $gmt($round($calc($inwave.length / 1000),0),nn:ss)
did -ra music.player 11 %playing
did -ra music.player 11 $replace($($+(%,length),2),:,Mins:) $+ Secs
spam
}
}
if (%loop == ON) {
did -u music.player 113
did -ra music.player 17 Normal
set %random OFF
set %loop OFF
splay stop
set %song $findfile(%dir,$did(music.player,2).seltext,1)
splay %song
set %playing $did(music.player,2).seltext
if (.mp3 isin %playing) || (.wma isin %playing) {
set %length $gmt($round($calc($insong.length / 1000),0),nn:ss)
did -ra music.player 5 %playing
did -ra music.player 11 $replace($($+(%,length),2),:,Mins:) $+ Secs
spam
}
else {
set %length $gmt($round($calc($inwave.length / 1000),0),nn:ss)
did -ra music.player 11 %playing
did -ra music.player 11 $replace($($+(%,length),2),:,Mins:) $+ Secs
spam
}
}
}
;-------------------------------------------------------Custom chan list
if $did = 201 { did -a music.player 203 $did(music.player,201).seltext | write CustomChanPlayList.txt $did(music.player,201).seltext }
if $did = 203 {
write -ds $did(music.player,203).seltext CustomChanPlayList.txt
did -r music.player 203
%a = 1
%b = $lines(CustomChanPlayList.txt)
while %a <= %b {
did -a music.player 203 $read(CustomChanPlayList.txt, %a)
inc %a
}
}
}
;-------------------------------------------------------Volume Scrollbar
on *:dialog:music.player:scroll:*: {
if $did = 108 {
set %vol $did(music.player,108).sel
did -ra music.player 13 $did(music.player,108).sel
vol -v $($+(%,vol),2)
}
}
;-------------------------------------------------------Right Click Event
on *:dialog:music.player:rclick:*: {
if ($mouse.key & 16) { dialog -dm add.list add.list | halt }
}
on *:dialog:music.player:init:0: {
play.list
list.chans
custom.list
track.num
;----- Volume Controls
did -ra music.player 13 $($+(%,vol),2)
did -c music.player 108 $($+(%,vol),2)
did -a music.player 5 %playing
did -a music.player 11 $replace($($+(%,length),2),:,Mins:) $+ Secs
did -c music.player 2 $($+(%,songnumber),2)
did -s music.player 2 $($+(%,songnumber),2)
;-----Spam Options
if (%spam.to == //ame) { did -ra music.player 15 All | did -c music.player 206 }
if (%spam.to == Custom) { did -ra music.player 15 Custom | did -c music.player 207 }
if (%spam.to == //echo -a) { did -ra music.player 15 None | did -c music.player 208 }
;-----Random Loop
if (%random == off) && (%loop == off) { did -ra music.player 17 Normal }
if (%random == on) { did -ra music.player 17 Random | did -c music.player 112 }
if (%loop == on) { did -s music.player 2 %songnumber | did -ra music.player 17 Loop | did -c music.player 113 }
;---Row 1
if (%themenumber == 1) { did -c music.player 302 }
if (%themenumber == 2) { did -c music.player 303 }
if (%themenumber == 3) { did -c music.player 304 }
if (%themenumber == 4) { did -c music.player 305 }
if (%themenumber == 5) { did -c music.player 306 }
if (%themenumber == 6) { did -c music.player 307 }
;---Row 2
if (%themenumber == 7) { did -c music.player 308 }
if (%themenumber == 8) { did -c music.player 309 }
if (%themenumber == 9) { did -c music.player 310 }
if (%themenumber == 10) { did -c music.player 311 }
if (%themenumber == 11) { did -c music.player 312 }
if (%themenumber == 12) { did -c music.player 317 }
if (%themenumber == 13) { did -c music.player 318 }
if (%themenumber == None) { did -c music.player 313 }
;-----Themes
if (%themenumber = 7) { did -a music.player 315 $strip(%theme1 %theme2) }
else { did -a music.player 315 %theme1 %theme2 }
}
on *:dialog:music.player:close:*: { }
;--------------------------------------------------------------------------------------------------------------Creating Playlist Dialog
dialog add.list {
title "Creating Playlist"
size -1 -1 100 40
option dbu
box "", 1, 2 2 96 36
text "Which would you like to add", 2, 15 12 92 10
button "Folder", 3, 5 22 43 10,
button "File", 4, 52 22 43 10,
}
on *:dialog:add.list:sclick:*: {
if $did = 3 { dialog -x add.list add.list | add.dir }
if $did = 4 { dialog -x add.list add.list | add.file }
}
;--------------------------------------------------------------------------------------------------------------aliases
alias musicplayer { dialog -dm music.player music.player }
alias advertise.player {
if ($($+(%,spam.to),2) == //ame) || ($($+(%,spam.to),2) == //echo -a) {
$($+(%,spam.to),2) %theme1 4S14ound 4P14ro %theme2 %theme1 4P14lays 4M14p3 4W14av 4a14nd 4W14ma 4F14iles4. %theme2 %theme1 Available 4@14 http://www.hawkee.com/snippet/4866/ %theme2 %theme1 %sinandsacrifice %theme2
}
else {
var %a = 1, %b = $lines(CustomChanPlayList.txt)
while %a <= %b {
msg $read(CustomChanPlayList.txt, %a) %theme1 4S14ound 4P14ro %theme2 %theme1 4P14lays 4M14p3 4W14av 4a14nd 4W14ma 4F14iles4. %theme2 %theme1 Available 4@14 http://www.hawkee.com/snippet/4866/ %theme2 %theme1 %sinandsacrifice %theme2
inc %a
}
}
}
alias spam {
if ($($+(%,spam.to),2) == //ame) || ($($+(%,spam.to),2) == //echo -a) {
$($+(%,spam.to),2) %theme1 %playing %theme2 %theme1 $replace($($+(%,length),2),:,Mins:) $+ Secs %theme2 %theme1 %sinandsacrifice $+ 4S14ound 4P14ro %theme2
track.num
}
else {
track.num
var %a = 1, %b = $lines(CustomChanPlayList.txt)
while %a <= %b {
msg $read(CustomChanPlayList.txt, %a) %theme1 %playing %theme2 %theme1 $replace($($+(%,length),2),:,Mins:) $+ Secs %theme2 %theme1 %sinandsacrifice $+ 4S14ound4,1•4P14ro4,1• %theme2
inc %a
}
}
}
alias track.num {
did -ra music.player 19 %songnumber
}
;-----list chans
alias list.chans {
var %a = 1, %b = $chan(0)
while %a <= %b {
did -a music.player 201 $chan(%a)
inc %a
}
}
alias custom.list {
var %a = 1, %b = $lines(CustomChanPlayList.txt)
while %a <= %b {
did -a music.player 203 $read(CustomChanPlayList.txt, %a)
inc %a
}
}
alias play.list {
var %a = 1, %b = $lines(MyPlaylist.txt)
while %a <= %b {
did -a music.player 2 $nopath($read(MyPlaylist.txt, %a))
inc %a
}
}
alias rainbowtext {
var %a = 1, %b = $len($$1), %rainbowtext, %r.color = 3
while %a <= %b {
%rainbowtext = %rainbowtext $+ $iif($len(%r.color) = $chr(49),$+($chr(3),$chr(48),%r.color,$iif($asc($mid($$1,%a,1)) = 32,$chr(160),$mid($$1,%a,1))),$+($chr(3),%r.color,$iif($asc($mid($$1,%a,1)) = 32,$chr(160),$mid($$1,%a,1))))
inc %r.color
if %r.color > 14 { %r.color = 3 }
inc %a
}
$iif($isid,return,echo -a) %rainbowtext
}
alias add.dir {
set %dir $sdir="Music Directory"
noop $findfile(%dir,*.mp3;*.wav;*.wma,0,write MyPlaylist.txt $1-)
;play.list
}
alias add.file {
set %temp.add.file $sfile(c:\)
write MyPlaylist.txt $($+(%,temp,.,add,.,file),2)
did -a music.player 2 $nopath(%temp.add.file)
}
on *:load: {
if ($version <= 6.16) { echo -a Sorry you are using a mIRC version $verion which is not compatible with this music player, You can upgrade mirc at www.mirc.com | unload $script }
set %song
set %playing No Song Playing
set %length 00:00
set %random OFF
set %loop OFF
set %spam.to //echo -a
set %songnumber 0
set %themenumber 1
set %vol 40000
set %ass1 (_|_)
set %ass2 (_/_) (_|_) (_\_)
set %hand1 4,1|..|, 14,1
set %hand2 4,1,|..|
set %music.gender
set %temp.init
set %temp.add.file
set %dir
set %theme1 4,1>14,1>15,1>0,1>4
set %theme2 0,1<15,1<14,1<4,1<
echo -a 4S14ound 4P14ro 4H14as 4L14oaded 4S14uccessfully4.
}
on 1:unload: {
unset %dir
unset %song
unset %playing
unset %length
unset %random
unset %loop
unset %spam.to
unset %songnumber
unset %themenumber
unset %vol
unset %ass1
unset %ass2
unset %hand1
unset %hand2
unset %theme1
unset %theme2
unset %music.gender
unset %temp.init
unset %time.left
echo -a 4S14ound 4P14ro 4H14as 4U14nloaded 4S14uccessfully4.
}



Comments

Sign in to comment.
PuNkTuReD   -  Mar 04, 2011
unfortunately this script is very old, and i do not go to irc anymore.
but, if you would like to edit them yourself, just use the inbuilt "find" feature of mirc's script editor and search for
;-------------------------------------------------------Themes

under that line is where the themes are stored.
eg:
Code
 


one for example is:
if $did = 320 { set %themenumber 15 | set %theme1 $rainbowtext(¯`·.¸¸¸.·´¯`·.¸¸¸.->) | set %theme2 $rainbowtext(<-.¸¸¸.·´¯`·.¸¸¸.·´¯) | did -ra music.player 315 $strip(%theme1 %theme2) | //echo -a %theme1 

the bits you would edit are:
set %theme1 $rainbowtext(¯`·.¸¸¸.·´¯`·.¸¸¸.->)
set %theme2 $rainbowtext(<-.¸¸¸.·´¯`·.¸¸¸.·´¯)

that would edit the start and end of the tags.

if you would like some more help, or have any questions, just send me a PM.
or you can send me some examples of themes you would like and i will replace the current themes with yours and send it to your PM.

thanks.
 Respond  
Slyvar   -  Mar 03, 2011
It's Excellent Script man, but if you could add an edit box for the Skin thing to make it editable. thanks xD


Rated 10

Like : Clicked
 Respond  
PuNkTuReD   -  Nov 15, 2009
@zamzam
ive used it with many other scripts before,
are you trying to use it in a pre made script like "invision" or something like that?
what server do you chat on? or come visit me at
//server -m irc.sassirc.com -j #sassirc.com
and ill try to help you.
also, can you tell me whats not working right?
any error messages, etc etc.


@Grant - picture of the music player, or pictures as button logos?
 Respond  
Grant-   -  Nov 15, 2009
Some pictures would be nice..
 Respond  
zamzam   -  Nov 15, 2009
hy punk , thanks to present this mp3 player i really love it much. But unfortunately this script only working on really pure irc , i mean its will not work with an irc wich is was have some script inside, can u understand what i try to telling you ?
i have many kind of irc but it almost all using script like funny script till defense script, and when i have done with copas ur script the player was ok but no voice loaded so i think its so funny , and i also try it at a original irc V6.35 and its work properly.
So could u help me to make it work at irc which is have another script inside. please and hope u will be the best .

Cheers,

zamzam
 Respond  
PuNkTuReD   -  Sep 30, 2009
ill be glad to help.

the music player has never had a "limit" put on it as to how many songs it can hold.

the splay function will play wam and wav files, the only diff is, you cant use identifiers to return info about the track the same as an mp3.
 Respond  
blackvenomm666   -  Sep 30, 2009
no it just wont add them. unless you upgraded it since i got it i got it sometime last year. im actually trying to code my own maybe you would be willing to help me? so far i got it to play mp3's but i dont know how to get it to play anythign else and it was a friend who helped with the mp3's im not that good of a scriptor yet
 Respond  
PuNkTuReD   -  Sep 30, 2009
mine has currently over 1200 in it

does it show an error when trying to add more?
 Respond  
blackvenomm666   -  Sep 30, 2009
the only thing i have run accross that i dont like punk is that it only holds around 400 songs if you could make it hold around 800 it would be perfect for me:D maybe something to work on?
 Respond  
PuNkTuReD   -  Sep 30, 2009
smiles
 Respond  
blackvenomm666   -  Sep 30, 2009
i really like this music player been using it for about a year now it works great
 Respond  
PuNkTuReD   -  Sep 27, 2008
srry bout that, fixed.
cheers.
 Respond  
tinkerbel   -  Sep 27, 2008
think its really good but when i add a new file the old music file dissapers on me i may be being blond but i havent a clue if im doing something wrond or not btw love the shakes her ass theam on it wicked p.s im really new at this too plz help me
 Respond  
PuNkTuReD   -  Aug 17, 2008
updated.
also
if your a pnplus user, you will have problems with this player on random or loop modes.
 Respond  
PuNkTuReD   -  Aug 10, 2008
nah cheers heaps man.
to be honest as i said this is my old one just \"revamed\"
i appreciate your suggestions and ill see what i can come up with.

-can now add individual files via \"file\" menu
-added next and last track buttons
-it echos even if spamming is off coz i listen to music on random with the dialog minimized
-scrolling volume control added
-fixed splay errors
-added unload event
-added menu placement

thanks again for your suggestions Typo :)

 Respond  
Typo   -  Aug 10, 2008
This is a pretty good start but it needs some work in my opinion.

For one its not intuitive to add files. The first thing you normally try is to right click in the file display box and select add or add list but there is no right click menu available at all inside that section of the dialog and you have to locate the buttons needed to load a directory below. When you do finally realize you have to use the make list button all it lets you do is select a folder. There was no way to select individual songs.

I noticed whenever I hit a button it made the button look weird until i clicked somewhere else.

I also notices your missing a next and back button to skip songs.

It doesn\'t make a lot of sense to make everything based in a dialog and yet you have it echo the song info into the active window instead of showing it in the dialog especially when the spamming options are disabled.

I think using volume presets like you have could end up with blown speakers because you have no idea how high high will be until you hit it. A fully adjustable volume control is really needed.

If you hit play and there isnt a playlist loaded it sends an splay error.

If a list is loaded and you dont have a song actually selected and you hit play it sends the same splay error.

You didn\'t use an on unload event to unset your variables and optionally delete the playlists.

I had to look inside the script until I found the alias section just to figure out how to load the player so you should probably include instructions to use /musicplayer in the introduction and even maybe add a menu entry to open it.

This mp3 player really does have a lot of potential but I just think it really needs some more work especially on the playlist system and volume control and other things I mentioned.

Sorry if it seems like I was ragging on your code as that wasnot the intention. I just thought I would point out everything that came to mind incase you planned on trying to improve it.

I\'ll wait to rate it incase you plan on making any of those changes.
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.