0 LIKES
Snippet
eNkIL Mp3 by eNkIL
In Category General IRC Posted by Snippets On 12/06/23
mp3 player
:::::::::::::::::::::::::::: :::::: Coded By eNkIL :::::: :::::::::::::::::::::::::::: ::: Cambiale si sabes =) ::: :::::::::::::::::::::::::::: menu menubar,channel,status { Mp3 Player:enkilmp3 - } alias enkilmp3 { if ($dialog(enkilmp3) == $null) { noop $dialog(enkilmp3,enkilmp3,-2) } else { .echo -at - Mp3 ON! } } alias -l mp3.title.role { if ($dialog(enkilmp3)) { if ($insong) { var %b = $insong.fname,%c = $sound(%b).artist,%d = $sound(%b).title if (%c) && (%d) { var %a = %c - %d } else { var %a = $nopath(%b) } if (!%mp3.x) { %mp3.x = $calc($len(%a)) } if ($dialog(enkilmp3)) did -ra enkilmp3 101 $replace($wrap($right($str($chr(160),60) $+ %a,%mp3.x),tahoma,1,1000,0,1),$chr(32),$chr(160)) } dec %mp3.x } } alias mp3.spam { if ($server == $null) { echo -st $replace(%mp3.spam.st,[b],,[u],,[k],,[song],%playingnow,[size],%mp3.size,[length],%mp3.time) 14[(15eNkIL's 8mp314)] | echo -s - } if ($active != $chan) { echo -st $replace(%mp3.spam.st,[b],,[u],,[k],,[song],%playingnow,[size],%mp3.size,[length],%mp3.time) 14[(15eNkIL's 8mp314)] | echo -s - } else { if (%mp3.msg == amsg) { amsg $replace(%mp3.spam.st,[b],,[u],,[k],,[song],%playingnow,[size],%mp3.size,[length],%mp3.time) 14[(15eNkIL's 8mp314)] } if (%mp3.msg == ame) { ame $replace(%mp3.spam.st,[b],,[u],,[k],,[song],%playingnow,[size],%mp3.size,[length],%mp3.time) 14[(15eNkIL's 8mp314)] } if (%mp3.msg == none) { echo -at $replace(%mp3.spam.st,[b],,[u],,[k],,[song],%playingnow,[size],%mp3.size,[length],%mp3.time) 14[(15eNkIL's 8mp314)] } } } alias mp3.info.song { set %mp3.size $round($calc($file($read(playlist.txt,%songnum)).size / 1048576),2) MB set %mp3.time $right($duration($calc($sound($read(playlist.txt,%songnum)).length / 1000),3),-3) mins if ($dialog(enkilmp3)) { did -ra enkilmp3 804 $round($calc($file($read(playlist.txt,%songnum)).size / 1048576),2) MB did -ra enkilmp3 802 $right($duration($calc($sound($read(playlist.txt,%songnum)).length / 1000),3),-3) mins did -c enkilmp3 202 $($+(%,songnum),2) did -s enkilmp3 202 $($+(%,songnum),2) } } alias -l mp3.back.song { if (%songnum < $lines(playlist.txt)) { dec %songnum splay $read(playlist.txt,%songnum) set %playingnow $nopath($read(playlist.txt,%songnum)) mp3.info.song mp3.spam } } alias -l mp3.play { if ($did($dname,202).seltext == $null) { echo -at Please select a song from the playlist. | halt } set %mp3.music.on 1 set %songnum $did(202).sel if ($read(playlist.txt,%songnum) == $null) { halt } else { splay $read(playlist.txt,%songnum) } .timermp3pos 0 1 mp3.pos $dname 103 .timermp3 0 1 mp3.rem.song .timermp32 0 1 mp3.count .timermp3.player -m 0 150 mp3.title.role set %playingnow $nopath($read(playlist.txt,%songnum)) mp3.info.song mp3.spam } alias -l mp3.check.play { set %mp3.music.on 1 if (%mp3.con.play) { if (%songnum < $lines(playlist.txt)) { inc %songnum splay $read(playlist.txt,%songnum) set %playingnow $nopath($read(playlist.txt,%songnum)) mp3.info.song mp3.spam } } elseif (%mp3.shuffle.play) { :ransong var %song = $read(playlist.txt) if ( $readn == %songnum ) goto ransong set %songnum $readn splay %song set %playingnow $nopath($read(playlist.txt,%songnum)) mp3.info.song mp3.spam } elseif (%mp3.repeat.play) { splay $read(playlist.txt,%songnum) set %playingnow $nopath($read(playlist.txt,%songnum)) } } alias mp3.pos { if (($1) && ($2)) { did -c $1 $2 $calc(($insong.pos / $insong.length) * 100) } } alias mp3.count { did -ra enkilmp3 104 $($remove($duration($calc($insong.pos / 1000 ),3),00:0),5) } alias -l mp3.rem.song { did -ra enkilmp3 102 - $+ $asctime($round($calc(($insong.length - $insong.pos) / 1000),0),n:ss),none) } alias -l mp3.pause { if ($inmp3) { if (!$inmp3.pause) { splay pause } else { splay resume } } } alias -l mp3.load.init { if (%mp3.music.on) { .timermp3 0 1 mp3.rem.song | .timermp3pos 0 1 mp3.pos $dname 103 | .timermp3.player -m 0 150 mp3.title.role | .timermp32 0 1 mp3.count } if (%mp3.msg == ame) { did -c $dname 601 } if (%mp3.msg == amsg) { did -c $dname 602 } if (%mp3.msg == none) { did -c $dname 603 } if (%mp3.con.play) { did -c $dname 502 } if (%mp3.shuffle.play) { did -c $dname 501 } if (%mp3.repeat.play) { did -c $dname 503 } did -ra $dname 300 Volume $chr(40) $+ $int($calc(($vol(master) / 65535) * 100)) $+ % $+ $chr(41) did -c $dname 301 $vol(master) if ($vol(master).mute == $true) { did -c $dname 302 | did -b $dname 301 | did -ar $dname 300 Volume (Muted) } var %a = 1, %b = playlist.txt while ( %a <= $lines(%b) ) { did -a $dname 202 $left($nopath($read(%b,%a)),-4) inc %a ; alias afplaylist { ; set %aftotalmp3s $findfile(%afmp3dir,*.mp3,0,1) ; var %i 1 ; while (%i <= %aftotalmp3s) { ; did -a afmp3 21 $nopath($findfile(%afmp3dir,*.mp3,%i,1)) inc %i ;} ;} } did -a $dname 806 $did(202).lines mp3.info.song } alias -l mp3.add.dir { if ($sdir(.,Choose mp3 directory)) { .remove playlist.txt did -r $dname 202 write -c playlist.txt var %x = 1, %d = $v1 while ( $findfile(%d,*.mp3,%x) ) { write playlist.txt $v1 did -a $dname 202 $left($nopath($v1),-4) inc %x } did -ra $dname 806 $calc(%x -1) } } alias -l mp3.rem.dir { .remove playlist.txt splay stop unset %mp3.x unset %songnum unset %playingnow did -r $dname 101,202,802,804,806 if ($read(playlist.txt,%songnum) == $null) { halt } } dialog enkilmp3 { title "Mp3 Player by eNkIL" size -1 -1 260 192 option dbu menu "Menu", 1 item "Close", 2, 1, cancel box "Now Playing...", 100, 2 2 257 19 text "", 101, 4 10 250 10, read center edit "", 102, 228 23 31 10, read center scroll "", 103, 33 24 194 8, range 0 100 horizontal bottom edit "", 104, 2 23 31 10, read center box "Playlist...", 200, 2 35 128 156 list 202, 4 44 122 143, size hsbar vsbar radio box "Volume", 300, 131 35 127 20 scroll "", 301, 158 44 98 8, horizontal bottom range 0 65535 check "Mute", 302, 135 44 25 10 box "Controls", 400, 131 55 127 23 button "Play", 401, 168 62 52 12, flat button "Stop", 402, 221 62 20 12, flat button "<<", 403, 133 62 13 12, flat button ">>", 404, 242 62 13 12, flat button "Pause", 405, 147 62 20 12, flat box "Play Method", 500, 131 78 127 21 radio "Shuffle", 501, 132 84 31 10, flat group radio "Normal", 502, 179 84 38 10, flat radio "Repeat", 503, 229 84 28 10, flat box "Spam", 600, 131 99 127 24 radio "/ame", 601, 132 108 19 10, group flat left radio "/amsg", 602, 165 108 21 10, flat left radio "None", 603, 195 108 21 10, flat left button "Spam MSG", 604, 219 107 37 12 box "Dir", 700, 131 122 127 24 button "Add Folder", 702, 132 130 40 12, flat button "Remove", 703, 216 130 40 12, flat box "Mp3 Info", 800, 131 145 61 46 text "Length", 801, 133 154 25 8, center edit "", 802, 158 153 32 11, read center text "Size", 803, 133 166 25 8, center edit "", 804, 158 165 32 11, read center text "Total Mp3", 805, 133 179 25 8, center edit "", 806, 158 177 32 11, read center button "Close", 900, 206 160 40 20, flat ok } dialog spambox { title "Spam Config." size -1 -1 218 50 option dbu box "", 1, 2 2 214 29 text "Spam:", 2, 4 11 15 8 edit "", 3, 20 9 195 12 text "Song: [song] - Length: [length] - Size: [size]", 4, 3 21 107 8 text "Bold: [b] - Colour: [c] - Underline: [u] ", 5, 126 21 89 8 button "Save", 6, 179 34 37 12,ok } on *:dialog:spambox:*:*:{ if ($devent == init) { did -a $dname 3 %mp3.spam.st } if ($devent == sclick) { if ($did = 6) { set %mp3.spam.st $did($dname,3) } } } on *:dialog:enkilmp3:*:*:{ if ($devent == init) { mp3.load.init } if ($devent == sclick) { if ($did = 302) { if ($vol(master).mute == $true) { vol -vu2 | did -u $dname 302 | did -e $dname 301 | did -ar $dname 300 Volume $chr(40) $+ $int($calc(($vol(master) / 65535) * 100)) $+ % $+ $chr(41) } elseif ($vol(master).mute == $false) { vol -vu1 | did -c $dname 302 | did -b $dname 301 | did -ar $dname 300 Volume (Muted) } } if ($did = 401) { mp3.play } if ($did = 402) { splay stop | set %mp3.music.on 0 | did -r $dname 101,802,804 | unset %playingnow | unset %mp3.x | unset %songnum } if ($did = 403) { mp3.back.song | unset %mp3.x } if ($did = 404) { mp3.check.play | unset %mp3.x } if ($did = 405) { mp3.pause } if ($did = 501) { set %mp3.shuffle.play $did($dname,501).state | set %mp3.repeat.play 0 | set %mp3.con.play 0 } if ($did = 502) { set %mp3.con.play $did($dname,502).state | set %mp3.repeat.play 0 | set %mp3.shuffle.play 0 } if ($did = 503) { set %mp3.repeat.play $did($dname,503).state | set %mp3.shuffle.play 0 | set %mp3.con.play 0 } if ($did = 601) { set %mp3.msg ame } if ($did = 602) { set %mp3.msg amsg } if ($did = 603) { set %mp3.msg none } if ($did = 604) { dialog -m spambox spambox } if ($did = 702) { mp3.add.dir | unset %mp3.x } if ($did = 703) { mp3.rem.dir | unset %mp3.x } } if ($devent == dclick) { if ($did = 202) { mp3.play } } if ($devent == scroll) { if ($did = 103) { .timerposition -p | splay -p seek $int($calc(($did(103).sel / 100) * $insong.length)) | .timerposition -r } if ($did = 301) { vol -v $did($did).sel | did -ar $dname 300 Volume $chr(40) $+ $int($calc(($vol(master) / 65535) * 100)) $+ % $+ $chr(41) } } if ($devent == close) { .timermp3pos off | .timermp3 off | .timermp3.player off | unset %mp3.x | .timermp32 off } } on *:MP3END: { mp3.check.play mp3.info.song }
Comments 0
You must be logged in to comment.