Evolution Mp3

Platform:  mIRC
Published  Apr 04, 2008
Updated  Apr 07, 2008
Ver 3 of my mp3. I had to readd this cause Hawkee deleted it -_- this is a 100% remake of my mp3, really nothing similar in design or function. If you need help just leave me a msg here. on *:Load: {
Set %play 1
Set %Spam 4
Set %option 17
}

menu menubar,channel,status {
{Evolution Mp3}: dialog -dm EMp3 EMp3
}
dialog EMp3 {
title "{Evolution Mp3}"
size -1 -1 150 117
option dbu

menu "Settings", 1
item "Set Play Type", 2, 1
item "Set Spam Channels", 3, 1
item "Set Spam Type", 4, 1

menu "Directory", 5
item "Set Directory", 6, 5
item "Update Directory", 7, 5

menu "PlayList", 8
item "Edit PlayList", 9, 8
item "Clear PlayList", 10, 8
item "Update Mp3List", 31, 8

box "Mp3 Info", 11, 2 1 146 28
Text "Mp3 Playing:", 12, 28 8 60 8
edit "Nothing is playing", 13, 5 16 90 10, flat
Text "Time Remaining:", 14, 105 8 44 8
edit "00:00", 15, 113 16 21 10, flat

box "Play Options", 16, 80 30 65 85
radio "", 17, 84 39 9 10
radio "", 18, 84 49 9 10
radio "", 19, 84 59 9 10
radio "", 20, 84 69 9 10
Text "Normal", 21, 94 39 30 8
Text "Repeat", 22, 94 49 30 8
Text "Continuous", 23, 94 59 30 8
Text "Random", 24, 94 69 30 8

button "Play", 25, 84 85 25 10, flat
button "Stop", 26, 115 85 25 10, flat
button "Pause", 27, 84 100 25 10, flat
button "Resume", 28, 115 100 25 10, flat

box "Mp3 List", 29, 2 30 76 85
list 30, 3 38 74 80, sort

}

on *:DIALOG:EMp3:init:0: {
did -c Emp3 %option
if (%play == 1) {
var %num $findfile(%dir, *.mp3,0,did -a Emp3 30 $nopath($1-))
}
if (%play == 2) {
var %PL 1
while (%PL <= $lines(PlayList.txt)) { did -a Emp3 30 $Nopath($read(PlayList.txt,%PL)) | inc %PL }
}
}

on *:dialog:Emp3:menu:*:{
if $did = 2 {
dialog -dm Play Play
}
if $did = 3 {
dialog -dm SC SC
}
if $did = 4 {
dialog -dm Spam Spam
}
if $did = 6 {
set %dir $sdir="Mp3 Directory"
write -c mp3.txt
noop $findfile(%dir,*.mp3,0,write mp3.txt $1-)
var %num $findfile(%dir, *.mp3,0,did -a Emp3 30 $nopath($1-))
}
if $did = 7 {
did -r Emp3 30
write -c mp3.txt
noop $findfile(%dir,*.mp3,0,write mp3.txt $1-)
var %num $findfile(%dir, *.mp3,0,did -a Emp3 30 $nopath($1-))
}
if $did = 9 {
dialog -dm Plist PList
}
if $did = 10 {
write -c PlayList.txt
}
if $did = 31 {
did -r Emp3 30
var %PL 1
while (%PL <= $lines(PlayList.txt)) { did -a Emp3 30 $Nopath($read(PlayList.txt,%PL)) | inc %PL }
}
}
on *:dialog:Emp3:sclick:*:{
if $did = 25 {
if (%play == 1) {
var %Playing $Remove($did(Emp3,30).seltext,.mp3)
set %song $findfile(%dir,$did(Emp3,30).seltext,1)
set %length $gmt($round($calc($mp3(%song).length / 1000),0),nn:ss)
set %songfind $read(mp3.txt, w, * $+ %song $+ *)
set %num $Readn
splay %song
did -ra Emp3 13 %playing
.timermp3 0 0 Remaining
spam
}
if (%play == 2) {
var %Playing $Remove($did(Emp3,30).seltext,.mp3)
set %song $findfile(%dir,$did(Emp3,30).seltext,1)
set %length $gmt($round($calc($mp3(%song).length / 1000),0),nn:ss)
set %songfind $read(playlist.txt, w, * $+ $did(Emp3,30).seltext $+ *)
set %num $Readn
splay %song
did -ra Emp3 13 %playing
.timermp3 0 0 Remaining
spam
}
}
if $did = 26 {
splay Stop
.timermp3 off
did -ra Emp3 13 Nothing is playing
did -ra Emp3 15 00:00
}
if $did = 27 {
splay pause
}
if $did = 28 {
splay resume
}
if ($did(17).state) { set %option 17 }
if ($did(18).state) { set %option 18 }
if ($did(19).state) { set %option 19 }
if ($did(20).state) { set %option 20 }
}

alias Remaining {
did -ra Emp3 15 $asctime($round($calc(($insong.length - $insong.pos) / 1000),0),nn:ss),none)
}

on *:dialog:Emp3:close:* {
.timermp3 off
splay stop
}

on *:mp3end:{
if (%option == 20) {
if (%Play == 1) {
splay $read(mp3.txt)
var %length $gmt($round($calc($mp3($insong.fname).length / 1000),0),nn:ss)
did -ra Emp3 13 $remove($nopath($insong.fname)$1-,.mp3)
.timermp3 0 0 Remaining
spam
}
if (%Play == 2) {
splay $findfile(%dir,$read(PlayList.txt),1)
var %length $gmt($round($calc($mp3($insong.fname).length / 1000),0),nn:ss)
did -ra Emp3 13 $remove($nopath($insong.fname)$1-,.mp3)
.timermp3 0 0 Remaining
spam
}
}
if (%option == 18) {
splay %Song
did -ra Emp3 13 $remove($nopath($insong.fname)$1-,.mp3)
Remaining
}
if (%option == 19) {
if (%play == 1) {
inc %num
if ($read(mp3.txt,%num) == $null) { halt }
splay $read(mp3.txt,%num)
var %length $gmt($round($calc($mp3($insong.fname).length / 1000),0),nn:ss)
did -ra Emp3 13 $remove($nopath($insong.fname)$1-,.mp3)
.timermp3 0 0 Remaining
spam
}
if (%play == 2) {
inc %num
if ($read(PlayList.txt,%num) == $null) { halt }
splay $findfile(%dir,$read(PlayList.txt,%num),1)
var %length $gmt($round($calc($mp3($insong.fname).length / 1000),0),nn:ss)
did -ra Emp3 13 $remove($nopath($insong.fname)$1-,.mp3)
.timermp3 0 0 Remaining
spam
}
}
}
==========Spam Channel Editor=====================
dialog SC {
title "Channels"
size -1 -1 80 90
option dbu

box "Channels", 1, 2 2 76 60
list 2, 3 10 74 52, sort
edit "", 3, 2 65 76 10
button "Add", 4, 10 78 25 10, flat
button "Del", 5, 43 78 25 10, flat
}

on *:DIALOG:SC:init:0: {
var %SC 1
while (%SC <= $lines(chans.txt)) { did -a SC 2 $read(chans.txt,%SC) | inc %SC }
}

on *:dialog:SC:sclick:*:{
if $did = 4 {
var %chan = $did(SC,3) | if (%chan == $null) return | if ($left(%chan,1) != $chr(35)) %chan = $chr(35) $+ %chan
did -a SC 2 $iif(%key,%key,%chan) | write -a Chans.txt %chan | did -r SC 3
}
if $did = 5 {
if ($did(2).sel == $null) return | var %line = $did(2).sel, %text = $did(2,%line) | did -d SC 2 $did(2).sel | write -ds $+ %text chans.txt
}
}

==========Spam Control=====================
dialog Spam {
title "Spam"
size -1 -1 80 42
option dbu

radio "", 1, 2 2 9 10
radio "", 2, 2 12 9 10
radio "", 3, 2 22 9 10
radio "", 4, 2 32 9 10
Text "Some Channels", 5, 12 2 40 8
Text "Amsg", 6, 12 12 30 8
Text "Active", 7, 12 22 30 8
Text "Off", 8, 12 32 30 8
}

on *:DIALOG:Spam:init:0: {
did -c Spam %Spam
}

on *:dialog:Spam:sclick:*:{
if ($did(1).state) { set %Spam 1 }
if ($did(2).state) { set %Spam 2 }
if ($did(3).state) { set %Spam 3 }
if ($did(4).state) { set %Spam 4 }
}

alias spam {
if (%spam == 1) {
var %chan 1
while (%chan <= $lines(chans.txt)) { msg $read(chans.txt,%chan) 1214{15Mp314:15 $Replace($remove($nopath($insong.fname)$1-,.mp3),-,12-15) $+ 14}12 14{15Length14:15 $Replace(%Length,:,12:15) $+ 14}12 | inc %chan }
}
if (%spam == 2) {
amsg 1214{15Mp314:15 $Replace($remove($nopath($insong.fname)$1-,.mp3),-,12-15) $+ 14}12 14{15Length14:15 $Replace(%Length,:,12:15) $+ 14}12
}
if (%spam == 3) {
msg $active 1214{15Mp314:15 $Replace($remove($nopath($insong.fname)$1-,.mp3),-,12-15) $+ 14}12 14{15Length14:15 $Replace(%Length,:,12:15) $+ 14}12 }
if (%spam == 4) {
Halt
}
}

==========Play Control=====================
dialog Play {
title "Control"
size -1 -1 80 22
option dbu

radio "", 1, 2 2 9 10
radio "", 2, 2 12 9 10
Text "Directory", 3, 12 2 40 8
Text "PlayList", 4, 12 12 30 8

}

on *:DIALOG:Play:init:0: {
did -c Play %play
}

on *:dialog:Play:sclick:*:{
if ($did(1).state) {
set %play 1
did -r Emp3 30
var %num $findfile(%dir, *.mp3,0,did -a Emp3 30 $nopath($1-)) }
if ($did(2).state) {
set %play 2
did -r Emp3 30
var %PL 1
while (%PL <= $lines(PlayList.txt)) { did -a Emp3 30 $Nopath($read(PlayList.txt,%PL)) | inc %PL }
}
}

==========PlayList=====================
dialog PList {
title "PlayList"
size -1 -1 180 90
option dbu

box "Directory", 1, 2 2 76 85
list 2, 3 10 74 80, sort

box "PlayList", 3, 102 2 76 85
list 4, 103 10 74 80, sort

button ">>", 5, 80 30 20 10, flat
button "<<", 6, 80 45 20 10, flat

}

on *:DIALOG:PList:init:0: {
var %PL 1
while (%PL <= $lines(PlayList.txt)) { did -a PList 4 $Nopath($read(PlayList.txt,%PL)) | inc %PL }
var %Direct 1
while (%Direct <= $lines(Mp3.txt)) { did -a PList 2 $Nopath($read(Mp3.txt,%Direct)) | inc %Direct }
}

on *:dialog:PList:sclick:*:{
if $did = 5 {
var %line = $did(2).sel, %text = $did(2,%line)
if ($read(playlist.txt, w, * $+ %Text $+ *) != $null) { Halt }
did -a PList 4 %text | write -a PlayList.txt %text
}
if $did = 6 {
if ($did(4).sel == $null) return | var %line = $did(4).sel | set %text $did(4,%line) | did -d PList 4 $did(4).sel | write -dw $+ " $+ %text $+ " PlayList.txt
}
}

Comments

Sign in to comment.
Mudkipz   -  May 06, 2008
In the spam, it say 00:00 for the time, bug =( other than that it\'s fine
 Respond  
^Neptune   -  May 02, 2008
I don\'t like this that much to be honest. There\'s quite a lot of stuff that could be put in (basics).

-It stops when you close it, that\'s really annoying
-No forward/previous buttons
-No volume controls :(
-Spam is really iffy.. it\'d be nice to make it customizable and move it into one dialog
-The radio buttons have to be clicked loads before they operate, not a clue why
 Respond  
Phoenix847   -  Apr 07, 2008
Quite impressive but I do have a few complaints about it xD
How about adding a Volume Control and a Seeker to Fast Forward/Rewind through the song?
And when its able to message channels, can you make it have all this instead: [06:06:17 PM] <@PhoenixBot>  (Metallica - One.mp3)(7mins 25secs/128 kbps/6.79MB) 
---Where it shows (the Artist - Song name) (Length of song/the kbps /size of the song in MB)

And one more complaint, the mp3 player I have right now, I\'m able to close out of it and it will continue to play in the back.
 Respond  
jonesy44   -  Apr 07, 2008
hehe okay :-)
 Respond  
^Neptune   -  Apr 07, 2008
It has been done before. :P

Maybe I can find it again and take it out and use it in my one xD
 Respond  
jonesy44   -  Apr 07, 2008
i\'m using a PicWindow mp3 player atm hehe i was pretty impressed by it so i kept it. but i have this script loaded as my backup still hee

but yes, it does help freeing up space.
If someone can develop a mirc script which conects to MSN messenger and does the display msg thing, then i\'ll be VERY impressed :P
 Respond  
^Neptune   -  Apr 07, 2008
That\'s usually why I use an MP3 Player in mIRC over something like iTunes.. if you close it, it frees up the taskbar (which I have a lot of stuff open)
 Respond  
Darkkeeper   -  Apr 07, 2008
lol well it stops because if it didnt i\'d have to halt a few things, but i might set it up to continue running the mp3 on close
 Respond  
^Neptune   -  Apr 07, 2008
I\'ve tested it and i\'m pleased to report no errors.

Suggestions:
-change that remaining time bit to like 00:00/Total time.
-it\'s very annoying how it stops playing when the dialog is closed
 Respond  
jonesy44   -  Apr 06, 2008
it\'s a nice script, there are a few little bugs which i\'ll type later, cba now. but with the whole \"spam\" stuff it would be much better if you had a command like the winamp link, press F12 and it will echo what you\'re listening to :)

something like:

Code
 
..
 Respond  
^Neptune   -  Apr 05, 2008
Woops :p
 Respond  
Darkkeeper   -  Apr 04, 2008
first off, i didnt delete your post neptune, hawkee deleted the whole script, i had to repost the whole thing, and both of my older versions were already removed
 Respond  
^Neptune   -  Apr 04, 2008
I like how you deleted my post about that you should update your script rather than post new versions.
 Respond  
Eugenio   -  Apr 04, 2008
I dont bother with MP3\'s ........stick to WMP
 Respond  
Darkkeeper   -  Apr 04, 2008
lol thx for the ideas, i\'m gonna start editing this one alot, so i\'ll add in a good bit of the stuff you mentioned. and i\'ll also put all the settings dialogs into 1 dialog lol
 Respond  
EL   -  Apr 04, 2008
Well im still esting it so i wont post buggs yet.Some suggestions maybe add all your options into one dialog sectioned off wit the radios or check boxed this way u dotn have 442309451230 dialogs just a thought ,also maybe a changeable theme to it cause honestly that theme is gag,also my want to think about a volume control an maybe a seek option,ahh yeah the playlists you may want to add a clear button the first time you open it you get all your mp3\'s lsited on bot maybe have it clear with abutton so u dont have to refresh the dialog,its really nice tho i like all the features altho i cant get it to work yet ..dont panic its my script bein a pain =/
 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.