menu * { MP3 Player: { /dialog -iedm mp3 mp3 did -a mp3 22 100 $+ $chr(37) /vol -v 65535 } } on *:dialog:mp3:init:0: { set %x 1 set %y 1 /timer 500 0.1 /expandmp3 var %h = 1 var %hi = $ini(mp3.ini,0) while (%h <= %hi) { inc %h } } alias expandmp3 { if (%x < 250) inc %x if (%y < 219) inc %y /dialog -s mp3 -1 -1 %x %y } dialog mp3 { title "mIRC MP3 Player" size -1 -1 250 200 Tab "Source", 1, 0 0 252 206 Tab "Folder", 2, 0 0 252 206 Tab "Songs", 3, 0 0 252 206 Tab "Player", 4, 0 0 252 206 text "Select your source you wish to find your directories from.", 5, 5 30 220 40, tab 1 button "My Music", 6, 15 70 220 30, tab 1 button "SD Card", 7, 15 100 220 30, tab 1 button "MS-Pro Card", 8, 15 130 220 30, tab 1 button "Use buttons to navagate.", 9, 15 160 220 30, tab 1, disable check "Show Message", 28, 100 50 100 20, tab 1 list 10, 5 30 240 175, tab 2 list 11, 5 30 240 175, tab 3 edit "Song:", 12, 5 30 240 20, tab 4, disable edit "Album:", 13, 5 50 240 20, tab 4, disable edit "Artist:", 14, 5 70 240 20, tab 4, disable box "Modes", 15, 18 90 100 102, tab 4 box "Volume", 16, 128 90 100 102, tab 4 button "Play", 17, 20 105 96 18, tab 4 button "Pause", 18, 20 122 96 18, tab 4 button "Stop", 19, 20 139 96 18, tab 4 button "Next", 20, 20 156 96 18, tab 4 button "Prev.", 21, 20 173 96 18, tab 4 edit "", 22, 130 105 96 20, tab 4, disable, center button "Up", 23, 130 126 96 20, tab 4 button "Down", 24, 130 146 96 20, tab 4 button "Mute", 25, 130 166 96 20, tab 4 menu "File", 26 item "Close", 27, 26, cancel menu "", 29 } alias newsong { if ($did(mp3,28).state == 1) { /amsg 12Now playing:4 $sound($insong.fname).title 12 $+ $chr(124) Artist:4 $sound($insong.fname).artist 12 $+ $chr(124) Album:4 $sound($insong.fname).album } } on *:dialog:mp3:sclick:27: { /dialog -m msg msg } on *:dialog:mp3:sclick:29: { /splay stop } on *:MP3END: { if ($did(mp3,11).sel == $calc($did(mp3,11).lines - 1)) { set %sel 1 did -c mp3 11 %sel /splay -m %dir $+ $did(mp3,10).seltext $+ \ $+ $did(mp3,11).seltext did -ra mp3 12 Song: $sound($insong.fname).title did -ra mp3 13 Album: $sound($insong.fname).album did -ra mp3 14 Artist: $sound($insong.fname).artist /newsong } else { set %sel $calc($did(mp3,11).sel + 1) did -c mp3 11 %sel /splay -m %dir $+ $did(mp3,10).seltext $+ \ $+ $did(mp3,11).seltext did -ra mp3 12 Song: $sound($insong.fname).title did -ra mp3 13 Album: $sound($insong.fname).album did -ra mp3 14 Artist: $sound($insong.fname).artist /newsong } } on *:dialog:mp3:dclick:10: { did -ra mp3 11 did -a mp3 11 $findfile(%dir $+ $did(10).seltext,*.mp3,0,did -a mp3 11 $remove($1-,%dir $+ $did(10).seltext)) did -c mp3 3 } on *:dialog:mp3:sclick:6,7,8: { if ($did == 6) { did -a mp3 10 $finddir(C:\Documents and Settings\Jo\My Documents\My Music\,*,0,did -a mp3 10 $remove($1-,C:\Documents and Settings\Jo\My Documents\My Music\)) set %dir C:\Documents and Settings\Jo\My Documents\My Music\ did -c mp3 2 } elseif ($did == 7) { set %dir F:\ did -a mp3 10 $finddir(F:\,*,0,did -a mp3 10 $remove($1-,F:\)) did -c mp3 2 } elseif ($did == 8) { set %dir I:\ did -a mp3 10 $finddir(I:\,*,0,did -a mp3 10 $remove($1-,I:\)) did -c mp3 2 } } on *:dialog:mp3:sclick:23,24,25: { if ($did == 23) { if ($remove($did(22),$chr(37)) == 100) { halt } else { set %x $calc($remove($did(22),$chr(37)) + 5) /vol -v $calc(%x / 100 * 65535) did -ra mp3 22 %x $+ $chr(37) unset %x } } elseif ($did == 24) { if ($remove($did(22),$chr(37)) == 0) { halt } else { set %x $calc($remove($did(22),$chr(37)) - 5) /vol -v $calc(%x / 100 * 65535) did -ra mp3 22 %x $+ $chr(37) unset %x } } elseif ($did == 25) { if ($did(25) == UnMute) { /vol -v %oldvol unset %oldvol did -ra mp3 25 Mute } else { set %oldvol $vol(master) /vol -v 0 did -ra mp3 25 UnMute } } } on *:dialog:mp3:sclick:18,19,20,21: { if ($did == 18) { if (%pause == on) { /splay resume unset %pause did -a mp3 18 Pause } else { set %pause on did -a mp3 18 UnPause /splay pause } } elseif ($did == 19) { /splay stop } elseif ($did == 20) { if ($did(11).sel == $calc($did(11).lines - 1)) { set %sel 2 did -c mp3 11 %sel /splay -m %dir $+ $did(10).seltext $+ \ $+ $did(11).seltext did -ra mp3 12 Song: $sound($insong.fname).title did -ra mp3 13 Album: $sound($insong.fname).album did -ra mp3 14 Artist: $sound($insong.fname).artist /newsong } else { set %sel $calc($did(11).sel + 1) did -c mp3 11 %sel /splay -m %dir $+ $did(10).seltext $+ \ $+ $did(11).seltext did -ra mp3 12 Song: $sound($insong.fname).title did -ra mp3 13 Album: $sound($insong.fname).album did -ra mp3 14 Artist: $sound($insong.fname).artist /newsong } } elseif ($did == 21) { if ($did(11).sel == 2) { set %sel $calc($did(11).lines - 1) did -c mp3 11 %sel /splay -m %dir $+ $did(10).seltext $+ \ $+ $did(11).seltext did -ra mp3 12 Song: $sound($insong.fname).title did -ra mp3 13 Album: $sound($insong.fname).album did -ra mp3 14 Artist: $sound($insong.fname).artist /newsong } else { set %sel $calc($did(11).sel - 1) did -c mp3 11 %sel /splay -m %dir $+ $did(10).seltext $+ \ $+ $did(11).seltext did -ra mp3 12 Song: $sound($insong.fname).title did -ra mp3 13 Album: $sound($insong.fname).album did -ra mp3 14 Artist: $sound($insong.fname).artist /newsong } } } on *:dialog:mp3:sclick:5,11: { did -c mp3 4 unset %pause did -ra mp3 18 Pause /splay -m %dir $+ $did(10).seltext $+ \ $+ $did(11).seltext did -ra mp3 12 Song: $sound($insong.fname).title did -ra mp3 13 Album: $sound($insong.fname).album did -ra mp3 14 Artist: $sound($insong.fname).artist /newsong }