Mp3 Dialog v1.3

By spitfire3292 on Nov 14, 2007

The features it contains are shown below:

Multiple Directories/Playlists
Play/Pause/Stop/Fast Forward/Rewind
Skip Forward & Backward
Volume Up & Down
Mute
Shuffle
Repeat
Count Down & Up (Music Length Based)
Custom or default display message
Quick Display Message
*Highlights Current Song Being Played

Image

Image

How To Use:

To use this MP3 Player load this file into your Remotes Section in mIRC (Alt-R) and hit OK
Now goto the Commands tab in your task bar and go down to MP3 Player and click.
It will if you want to add a directory, click yes and select a folder with your music files. Name the Playlist what you want
Now you can either start listening OR you can set up your Display Message.
If you chose to start listening right away, double click your Directory name, and then just double click the song you want to play. Simple as that!
If you chose to set up your Display Message goto Display > mIRC Message Display and follow the instructions. If you leave the Custom Message box blank it will use a default message.
If you want to add or delete a directory goto File > Add/Delete Directory depending on which you want to do and follow instructions.
If you dont want your Song's to be said outloud at all you can set your Display Message to Silent, but if there is a particular song you want people to see you can goto Display > Quick Message Display and will send the song out only once.

All the buttons are self explanitory:

Play Button - Plays the song highlighted
Stop Button - Stops the song
Pause Button - Pauses the current song playing
<< >> - Skip Song Backwards and Skip Song Forwards
< > - Rewind Song and Fast Foreward Song
Up - Turn the volume up
Down - Turn the volume down
Mute - Mute the volume
Repeat - Repeats the current song playing
Shuffle - Randomly plays songs

IMPORTANT NOTES:

*** NOTE: If you are running mIRC v6.21 you must enable sounds for the MP3 Player to work correctly. For you to do this goto Options > Display > Enable Sounds and click Apply,OK

*** NOTE: If the song playing doesnt work, or it doesnt display the title in your Display Message it is probably because you were using Illegal Music Downloading Software such as Limewire. The Display Message problem can't be fixed but the playing problem can. Check to see if you song has a space in the beginning or end of the title and delete it.

For example. "This is a song" would work as a valid song title. " This is a song" would be invalid because it has a space before the song title. "This is a song " also wouldn't work because there is a space after the song title. And yup you guessed it, " This is a song " wouldnt work because there is a space BOTH before and after the song title.

dialog mp3 { 
  title "Spitfire3292's MP3 Player v1 :" 
  size -1 -1 193 124 
  option dbu 
  list 1, 70 10 120 80, size vsbar 
  list 2, 10 9 50 74, size 
  box "Music Play List", 3, 67 1 125 93 
  box "Music Directory", 4, 2 1 65 85 
  button "Play", 5, 67 94 41 12 
  button "Pause", 6, 151 94 41 12 
  button "Stop", 7, 109 94 41 12 
  button ">>", 8, 161 109 31 12 
  button "<<", 9, 67 109 31 12 
  check "Repeat", 10, 3 90 30 10 
  check "Shuffle", 11, 3 100 28 10 
  check "Mute", 27, 3 110 33 10 
  button "Up", 12, 40 94 22 12 
  button "Down", 13, 40 109 22 12 
  box "Volume", 14, 37 86 28 37 
  button "<", 15, 99 109 30 12 
  button ">", 16, 130 109 30 12 
  menu "File", 17 
  item "Add Directory", 18, 17 
  item "Delete Directory", 19, 17 
  item "Exit", 20, 17, cancel 
  menu "Display", 21 
  item "mIRC Message Display", 22, 21 
  item "Quick Message Display", 26, 21 
  menu "Count Display", 23, 21 
  item "Count Up", 24, 23 
  item "Count Down", 25, 23 
} 

menu * { 
  MP3 Player: /dialog -md mp3 mp3 
} 

alias count { 
  if ($readini(mp3.ini,Config,Count) = up) {  
    dialog -t mp3 $gettok($dialog(mp3).title,1,58) $chr(58) $($remove($duration($calc($insong.pos / 1000 ),3),00:0),5) Vol: $int($calc(( $vol(master) / 65535) * 100)) $+ % 
  } 
  elseif ($readini(mp3.ini,Config,Count) = dwn) { 
    dialog -t mp3 $gettok($dialog(mp3).title,1,58) $chr(58) $remove($duration($calc(($sound($insong.fname).length - $insong.pos) / 1000),3),00:0) Vol: $int($calc(( $vol(master) / 65535) * 100)) $+ % 
  } 
} 

on *:dialog:mp3:init:0:{ 
  /timermp3 0 1 /count 
  if (!$readini(mp3.ini,Config,Count)) { /writeini mp3.ini Config Count up } 
  if ((!$readini(mp3.ini,Config,Load)) && (!$readini(mp3.ini,Directory,*))) { 
    if ($$?!="Add Directory Now?" == $true) { 
      /writeini mp3.ini Directory $replace($$?="Playlist Name:",$chr(32),_) $sdir(*, Choose a Music Folder) 
      /writeini mp3.ini Config Load True 
    } 
  } 
  if ($vol(master).mute = $true) { 
    /did -c $dname 27
  }
  var %dir = 1 
  while (%dir <= $ini(mp3.ini,Directory,0)) { 
    /did -a mp3 2 $ini(mp3.ini,Directory,%dir) 
    inc %dir 
  } 
} 

on *:dialog:mp3:close:0:{ 
  /splay -p stop 
  /timermp3 off 
} 

on *:dialog:mp3:menu:18:{ 
  /writeini mp3.ini Directory $replace($$?="Playlist Name:",$chr(32),_) $sdir(*, Choose a Music Folder) 
  /writeini mp3.ini Config Load True 
  /did -r mp3 2 
  var %dir = 1 
  while (%dir <= $ini(mp3.ini,Directory,0)) { 
    /did -a mp3 2 $ini(mp3.ini,Directory,%dir) 
    inc %dir 
  } 
} 

on *:dialog:mp3:menu:19:{ 
  /remini mp3.ini Directory $replace($$?="Playlist Name:",$chr(32),_) 
  /did -r mp3 2 
  var %dir = 1 
  while (%dir <= $ini(mp3.ini,Directory,0)) { 
    /did -a mp3 2 $ini(mp3.ini,Directory,%dir) 
    inc %dir 
  } 
} 

on *:dialog:mp3:dclick:2:{ 
  /did -r mp3 1 
  /noop $findfile($readini(mp3.ini,directory,$did(2).seltext),*.mp3,0,did -a mp3 1 $nopath($left($1-,-4))) 
} 

on *:dialog:mp3:dclick:1:{ 
  /splay -p $+($readini(mp3.ini,Directory,$did($dname,2).seltext),$+($did($dname,1).seltext,.mp3)) 
  if ($readini(mp3.ini,Config,Disp) = echo) { 
    if ($readini(mp3.ini,Config,Custom)) { 
      /echo -a $c1($replace($readini(mp3.ini,Config,Custom),[length],$remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0),[bits],$sound($insong.fname).bitrate,[artist],$sound($insong.fname).artist,[title],$sound($insong.fname).title,$chr(124),$+($chr(3),$readini(mp3.ini,Config,Color2)),$chr(126),$+($chr(3),$readini(mp3.ini,Config,Color1)))) 
      halt 
    } 
    /echo -a $c1(Now Playing:) $c2($sound($insong.fname).title) $c1(by) $c2($sound($insong.fname).artist) $c1(-) $c2($remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0)) $c1(-) $c2($sound($insong.fname).bitrate kbps) 
  } 
  if ($readini(mp3.ini,Config,Disp) = chan) { 
    if ($readini(mp3.ini,Config,Custom)) { 
      /amsg $c1($replace($readini(mp3.ini,Config,Custom),[length],$remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0),[bits],$sound($insong.fname).bitrate,[artist],$sound($insong.fname).artist,[title],$sound($insong.fname).title,$chr(124),$+($chr(3),$readini(mp3.ini,Config,Color2)),$chr(126),$+($chr(3),$readini(mp3.ini,Config,Color1)))) 
      halt 
    } 
    /amsg $c1(I am now playing:) $c2($sound($insong.fname).title) $c1(by) $c2($sound($insong.fname).artist) $c1(-) $c2($remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0)) $c1(-) $c2($sound($insong.fname).bitrate kbps) 
  } 
} 

on *:dialog:mp3:sclick:5:{ 
  if ($insong.pause = $true) { 
    /splay resume 
  } 
  else { 
    /splay -p $+($readini(mp3.ini,Directory,$did($dname,2).seltext),$+($did($dname,1).seltext,.mp3)) 
    if ($readini(mp3.ini,Config,Disp) = echo) { 
      if ($readini(mp3.ini,Config,Custom)) { 
        /echo -a $c1($replace($readini(mp3.ini,Config,Custom),[length],$remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0),[bits],$sound($insong.fname).bitrate,[artist],$sound($insong.fname).artist,[title],$sound($insong.fname).title,$chr(124),$+($chr(3),$readini(mp3.ini,Config,Color2)),$chr(126),$+($chr(3),$readini(mp3.ini,Config,Color1)))) 
        halt 
      } 
      /echo -a $c1(Now Playing:) $c2($sound($insong.fname).title) $c1(by) $c2($sound($insong.fname).artist) $c1(-) $c2($remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0)) $c1(-) $c2($sound($insong.fname).bitrate kbps) 
    } 
    if ($readini(mp3.ini,Config,Disp) = chan) { 
      if ($readini(mp3.ini,Config,Custom)) { 
        /amsg $c1($replace($readini(mp3.ini,Config,Custom),[length],$remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0),[bits],$sound($insong.fname).bitrate,[artist],$sound($insong.fname).artist,[title],$sound($insong.fname).title,$chr(124),$+($chr(3),$readini(mp3.ini,Config,Color2)),$chr(126),$+($chr(3),$readini(mp3.ini,Config,Color1)))) 
        halt 
      } 
      /amsg $c1(I am now playing:) $c2($sound($insong.fname).title) $c1(by) $c2($sound($insong.fname).artist) $c1(-) $c2($remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0)) $c1(-) $c2($sound($insong.fname).bitrate kbps) 
    } 
  } 
} 

on *:MP3END:{ 
  if ($did(mp3,10).state = 1) { /splay -p $+($readini(mp3.ini,Directory,$did(mp3,2).seltext),$did(mp3,1,$did(mp3,1,1).sel).text,.mp3) 
    /did -c mp3 1 $calc($did(mp3,1,1).sel) 
    if ($readini(mp3.ini,Config,Disp) = echo) { 
      if ($readini(mp3.ini,Config,Custom)) { 
        /echo -a $c1($replace($readini(mp3.ini,Config,Custom),[length],$remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0),[bits],$sound($insong.fname).bitrate,[artist],$sound($insong.fname).artist,[title],$sound($insong.fname).title,$chr(124),$+($chr(3),$readini(mp3.ini,Config,Color2)),$chr(126),$+($chr(3),$readini(mp3.ini,Config,Color1)))) 
        halt 
      } 
      /echo -a $c1(Now Playing:) $c2($sound($insong.fname).title) $c1(by) $c2($sound($insong.fname).artist) $c1(-) $c2($remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0)) $c1(-) $c2($sound($insong.fname).bitrate kbps) 
    } 
    if ($readini(mp3.ini,Config,Disp) = chan) { 
      if ($readini(mp3.ini,Config,Custom)) { 
        /amsg $c1($replace($readini(mp3.ini,Config,Custom),[length],$remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0),[bits],$sound($insong.fname).bitrate,[artist],$sound($insong.fname).artist,[title],$sound($insong.fname).title,$chr(124),$+($chr(3),$readini(mp3.ini,Config,Color2)),$chr(126),$+($chr(3),$readini(mp3.ini,Config,Color1)))) 
        halt 
      } 
      /amsg $c1(I am now playing:) $c2($sound($insong.fname).title) $c1(by) $c2($sound($insong.fname).artist) $c1(-) $c2($remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0)) $c1(-) $c2($sound($insong.fname).bitrate kbps) 
    } 
    halt 
  } 
  if ($did(mp3,11).state = 1) { /var %x = $rand(1,$did(mp3,1).lines) 
    /splay -p $+($readini(mp3.ini,Directory,$did(mp3,2).seltext),$did(mp3,1,%x).text,.mp3) 
    /did -c mp3 1 %x 
    if ($readini(mp3.ini,Config,Disp) = echo) { 
      if ($readini(mp3.ini,Config,Custom)) { 
        /echo -a $c1($replace($readini(mp3.ini,Config,Custom),[length],$remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0),[bits],$sound($insong.fname).bitrate,[artist],$sound($insong.fname).artist,[title],$sound($insong.fname).title,$chr(124),$+($chr(3),$readini(mp3.ini,Config,Color2)),$chr(126),$+($chr(3),$readini(mp3.ini,Config,Color1)))) 
        halt 
      } 
      /echo -a $c1(Now Playing:) $c2($sound($insong.fname).title) $c1(by) $c2($sound($insong.fname).artist) $c1(-) $c2($remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0)) $c1(-) $c2($sound($insong.fname).bitrate kbps) 
    } 
    if ($readini(mp3.ini,Config,Disp) = chan) { 
      if ($readini(mp3.ini,Config,Custom)) { 
        /amsg $c1($replace($readini(mp3.ini,Config,Custom),[length],$remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0),[bits],$sound($insong.fname).bitrate,[artist],$sound($insong.fname).artist,[title],$sound($insong.fname).title,$chr(124),$+($chr(3),$readini(mp3.ini,Config,Color2)),$chr(126),$+($chr(3),$readini(mp3.ini,Config,Color1)))) 
        halt 
      } 
      /amsg $c1(I am now playing:) $c2($sound($insong.fname).title) $c1(by) $c2($sound($insong.fname).artist) $c1(-) $c2($remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0)) $c1(-) $c2($sound($insong.fname).bitrate kbps) 
    } 
    halt 
  } 
  /splay -p $+($readini(mp3.ini,Directory,$did(mp3,2).seltext),$did(mp3,1,$calc(1 + $did(mp3,1,1).sel)).text,.mp3) 
  /did -c mp3 1 $calc($did(mp3,1,1).sel + 1) 
  if ($readini(mp3.ini,Config,Disp) = echo) { 
    if ($readini(mp3.ini,Config,Custom)) { 
      /echo -a $c1($replace($readini(mp3.ini,Config,Custom),[length],$remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0),[bits],$sound($insong.fname).bitrate,[artist],$sound($insong.fname).artist,[title],$sound($insong.fname).title,$chr(124),$+($chr(3),$readini(mp3.ini,Config,Color2)),$chr(126),$+($chr(3),$readini(mp3.ini,Config,Color1)))) 
      halt 
    } 
    /echo $c1(Now Playing:) $c2($sound($insong.fname).title) $c1(by) $c2($sound($insong.fname).artist) $c1(-) $c2($remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0)) $c1(-) $c2($sound($insong.fname).bitrate kbps) 
  } 
  if ($readini(mp3.ini,Config,Disp) = chan) { 
    if ($readini(mp3.ini,Config,Custom)) { 
      /amsg $c1($replace($readini(mp3.ini,Config,Custom),[length],$remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0),[bits],$sound($insong.fname).bitrate,[artist],$sound($insong.fname).artist,[title],$sound($insong.fname).title,$chr(124),$+($chr(3),$readini(mp3.ini,Config,Color2)),$chr(126),$+($chr(3),$readini(mp3.ini,Config,Color1)))) 
      halt 
    } 
    /amsg $c1(I am now playing:) $c2($sound($insong.fname).title) $c1(by) $c2($sound($insong.fname).artist) $c1(-) $c2($remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0)) $c1(-) $c2($sound($insong.fname).bitrate kbps) 
  } 
} 

on *:dialog:mp3:sclick:7:{ 
  /splay -p stop 
} 

on *:dialog:mp3:sclick:6:{ 
  /splay -p pause 
} 

on *:dialog:mp3:sclick:15:{ 
  /splay -p seek $calc($insong.pos - 5000) 
} 

on *:dialog:mp3:sclick:16:{ 
  /splay -p seek $calc($insong.pos + 5000) 
} 

on *:dialog:mp3:sclick:8:{ 
  if ($did(mp3,11).state = 1) { /var %x = $rand(1,$did(mp3,1).lines) 
    /splay -p $+($readini(mp3.ini,Directory,$did(mp3,2).seltext),$did(mp3,1,%x).text,.mp3) 
    /did -c mp3 1 %x 
    if ($readini(mp3.ini,Config,Disp) = echo) { 
      if ($readini(mp3.ini,Config,Custom)) { 
        /echo -a $c1($replace($readini(mp3.ini,Config,Custom),[length],$remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0),[bits],$sound($insong.fname).bitrate,[artist],$sound($insong.fname).artist,[title],$sound($insong.fname).title,$chr(124),$+($chr(3),$readini(mp3.ini,Config,Color2)),$chr(126),$+($chr(3),$readini(mp3.ini,Config,Color1)))) 
        halt 
      } 
      /echo -a $c1(Now Playing:) $c2($sound($insong.fname).title) $c1(by) $c2($sound($insong.fname).artist) $c1(-) $c2($remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0)) $c1(-) $c2($sound($insong.fname).bitrate kbps) 
    } 
    if ($readini(mp3.ini,Config,Disp) = chan) { 
      if ($readini(mp3.ini,Config,Custom)) { 
        /amsg $c1($replace($readini(mp3.ini,Config,Custom),[length],$remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0),[bits],$sound($insong.fname).bitrate,[artist],$sound($insong.fname).artist,[title],$sound($insong.fname).title,$chr(124),$+($chr(3),$readini(mp3.ini,Config,Color2)),$chr(126),$+($chr(3),$readini(mp3.ini,Config,Color1)))) 
        halt 
      } 
      /amsg $c1(I am now playing:) $c2($sound($insong.fname).title) $c1(by) $c2($sound($insong.fname).artist) $c1(-) $c2($remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0)) $c1(-) $c2($sound($insong.fname).bitrate kbps) 
    } 
    halt 
  } 
  /splay -p $+($readini(mp3.ini,Directory,$did(mp3,2).seltext),$did(mp3,1,$calc(1 + $did(mp3,1,1).sel)).text,.mp3) 
  /did -c mp3 1 $calc($did(mp3,1,1).sel + 1) 
  if ($readini(mp3.ini,Config,Disp) = echo) { 
    if ($readini(mp3.ini,Config,Custom)) { 
      /echo -a $c1($replace($readini(mp3.ini,Config,Custom),[length],$remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0),[bits],$sound($insong.fname).bitrate,[artist],$sound($insong.fname).artist,[title],$sound($insong.fname).title,$chr(124),$+($chr(3),$readini(mp3.ini,Config,Color2)),$chr(126),$+($chr(3),$readini(mp3.ini,Config,Color1)))) 
      halt 
    } 
    /echo -a $c1(Now Playing:) $c2($sound($insong.fname).title) $c1(by) $c2($sound($insong.fname).artist) $c1(-) $c2($remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0)) $c1(-) $c2($sound($insong.fname).bitrate kbps) 
  } 
  if ($readini(mp3.ini,Config,Disp) = chan) { 
    if ($readini(mp3.ini,Config,Custom)) { 
      /amsg $c1($replace($readini(mp3.ini,Config,Custom),[length],$remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0),[bits],$sound($insong.fname).bitrate,[artist],$sound($insong.fname).artist,[title],$sound($insong.fname).title,$chr(124),$+($chr(3),$readini(mp3.ini,Config,Color2)),$chr(126),$+($chr(3),$readini(mp3.ini,Config,Color1)))) 
      halt 
    } 
    /amsg $c1(I am now playing:) $c2($sound($insong.fname).title) $c1(by) $c2($sound($insong.fname).artist) $c1(-) $c2($remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0)) $c1(-) $c2($sound($insong.fname).bitrate kbps) 
  } 
} 

on *:dialog:mp3:sclick:9:{ 
  if ($did(mp3,11).state = 1) { /var %x = $rand(1,$did(mp3,1).lines) 
    /splay -p $+($readini(mp3.ini,Directory,$did(mp3,2).seltext),$did(mp3,1,%x).text,.mp3) 
    /did -c mp3 1 %x 
    if ($readini(mp3.ini,Config,Disp) = echo) { 
      if ($readini(mp3.ini,Config,Custom)) { 
        /echo -a $c1($replace($readini(mp3.ini,Config,Custom),[length],$remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0),[bits],$sound($insong.fname).bitrate,[artist],$sound($insong.fname).artist,[title],$sound($insong.fname).title,$chr(124),$+($chr(3),$readini(mp3.ini,Config,Color2)),$chr(126),$+($chr(3),$readini(mp3.ini,Config,Color1)))) 
        halt 
      } 
      /echo -a $c1(Now Playing:) $c2($sound($insong.fname).title) $c1(by) $c2($sound($insong.fname).artist) $c1(-) $c2($remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0)) $c1(-) $c2($sound($insong.fname).bitrate kbps) 
    } 
    if ($readini(mp3.ini,Config,Disp) = chan) { 
      if ($readini(mp3.ini,Config,Custom)) { 
        /amsg $c1($replace($readini(mp3.ini,Config,Custom),[length],$remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0),[bits],$sound($insong.fname).bitrate,[artist],$sound($insong.fname).artist,[title],$sound($insong.fname).title,$chr(124),$+($chr(3),$readini(mp3.ini,Config,Color2)),$chr(126),$+($chr(3),$readini(mp3.ini,Config,Color1)))) 
        halt 
      } 
      /amsg $c1(I am now playing:) $c2($sound($insong.fname).title) $c1(by) $c2($sound($insong.fname).artist) $c1(-) $c2($remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0)) $c1(-) $c2($sound($insong.fname).bitrate kbps) 
    } 
    halt 
  } 
  /splay -p $+($readini(mp3.ini,Directory,$did(mp3,2).seltext),$did(mp3,1,$calc($did(mp3,1,1).sel - 1)).text,.mp3) 
  /did -c mp3 1 $calc($did(mp3,1,1).sel - 1) 
  if ($readini(mp3.ini,Config,Disp) = echo) { 
    if ($readini(mp3.ini,Config,Custom)) { 
      /echo -a $c1($replace($readini(mp3.ini,Config,Custom),[length],$remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0),[bits],$sound($insong.fname).bitrate,[artist],$sound($insong.fname).artist,[title],$sound($insong.fname).title,$chr(124),$+($chr(3),$readini(mp3.ini,Config,Color2)),$chr(126),$+($chr(3),$readini(mp3.ini,Config,Color1)))) 
      halt 
    } 
    /echo -a $c1(Now Playing:) $c2($sound($insong.fname).title) $c1(by) $c2($sound($insong.fname).artist) $c1(-) $c2($remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0)) $c1(-) $c2($sound($insong.fname).bitrate kbps) 
  } 
  if ($readini(mp3.ini,Config,Disp) = chan) { 
    if ($readini(mp3.ini,Config,Custom)) { 
      /amsg $c1($replace($readini(mp3.ini,Config,Custom),[length],$remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0),[bits],$sound($insong.fname).bitrate,[artist],$sound($insong.fname).artist,[title],$sound($insong.fname).title,$chr(124),$+($chr(3),$readini(mp3.ini,Config,Color2)),$chr(126),$+($chr(3),$readini(mp3.ini,Config,Color1)))) 
      halt 
    } 
    /amsg $c1(I am now playing:) $c2($sound($insong.fname).title) $c1(by) $c2($sound($insong.fname).artist) $c1(-) $c2($remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0)) $c1(-) $c2($sound($insong.fname).bitrate kbps) 
  } 
} 

on *:dialog:mp3:menu:24:{ 
  /writeini mp3.ini Config Count up 
} 
on *:dialog:mp3:menu:25:{ 
  /writeini mp3.ini Config Count dwn 
} 

on *:dialog:mp3:sclick:12:{ 
  /vol -v $calc( $vol(master) + 5000) 
} 

on *:dialog:mp3:sclick:13:{ 
  /vol -v  $calc( $vol(master) - 5000) 
} 

on *:dialog:mp3:menu:22:{ 
  /dialog -md mp3disp mp3disp 
} 

on *:dialog:mp3:menu:26:{ 
  if ($insong.fname = $null) { 
    /amsg $c1(I am not currently playing a song.) 
    halt 
  } 
  /amsg $c1(I am now playing:) $c2($sound($insong.fname).title) $c1(by) $c2($sound($insong.fname).artist) $c1(-) $c2(Length: $remove($duration($calc(($sound($insong.fname).length) / 1000),3),00:0)) $c1(-) $c2(Position: $($remove($duration($calc($insong.pos / 1000 ),3),00:0),5)) $c1(-) $c2($sound($insong.fname).bitrate kbps) 
} 

on *:dialog:mp3:sclick:27:{ 
  if ($did(mp3,27).state = 1) { 
    /vol -vu1 
  } 
  if ($did(mp3,27).state = 0) { 
    /vol -vu2 
  } 
} 

dialog mp3disp { 
  title "mIRC Message Display" 
  size -1 -1 111 101 
  option dbu 
  text "Color 1", 1, 66 4 19 8 
  text "Color 2", 2, 66 15 19 8 
  edit "", 3, 87 4 15 10 
  edit "", 4, 87 15 15 10 
  radio "Silent/Manual", 5, 1 3 45 10 
  radio "Echo", 6, 1 18 23 10 
  radio "Display in Channel", 7, 1 32 55 10 
  button "Cancel", 8, 62 33 20 12, cancel 
  button "Save", 9, 89 33 20 12, ok 
  text "Custom Display Message", 10, 1 48 108 9, center 
  edit "", 11, 1 59 109 10, autohs 
  text "Use [length] for the length of the song. Use [bits] for the bitrate of the song.     Use [artist] for the artist of the song.     Use [title] for the title of the song.", 12, 2 71 105 29 
} 

on *:dialog:mp3disp:init:0:{ 
  /did -a mp3disp 3 $readini(mp3.ini,Config,Color1) 
  /did -a mp3disp 4 $readini(mp3.ini,Config,Color2) 
  /did -a mp3disp 11 $remove($readini(mp3.ini,Config,Custom),|,~,kbps) 
  if ($readini(mp3.ini,Config,Disp) = echo) { 
    /did -c mp3disp 6 
  } 
  if ($readini(mp3.ini,Config,Disp) = chan) { 
    /did -c mp3disp 7 
  } 
  if (!$readini(mp3.ini,Config,Disp)) { 
    /did -c mp3disp 5 
  } 
} 

on *:dialog:mp3disp:sclick:9:{ 
  /writeini mp3.ini Config Color1 $iif(!$did(3),01,$iif($len($did(3)) = 1,0 $+ $did(3),$did(3)))
  /writeini mp3.ini Config Color2 $iif(!$did(4),01,$iif($len($did(4)) = 1,0 $+ $did(4),$did(4)))
  if ($did(11) != $null) { 
    /writeini mp3.ini Config Custom $replace($did(11),[length],$chr(124) $+ [length] $+ ~,[artist],$chr(124) $+ [artist] $+ ~,[bits],$chr(124) $+ [bits] kbps $+ ~,[title],$chr(124) $+ [title] $+ ~) 
  } 
  if ($did(11) = $null) { 
    /remini mp3.ini Config Custom 
  }  
  if ($did(mp3disp,5).state = 1) { /remini mp3.ini Config Disp } 
  if ($did(mp3disp,6).state = 1) { /writeini mp3.ini Config Disp echo } 
  if ($did(mp3disp,7).state = 1) { /writeini mp3.ini Config Disp chan } 
} 

alias -l c1 { return $+($chr(3),$readini(mp3.ini,Config,Color1),$1-,$chr(3)) } 
alias -l c2 { return $+($chr(3),$readini(mp3.ini,Config,Color2),$1-,$chr(3)) }

Comments

Sign in to comment.
eyiezinc   -  Feb 04, 2010

i think $replace($nopath($longfn($inmp3.fname)),_,$chr(32)) better than $sound($insong.fname).artist

 Respond  
Nomader   -  Jul 10, 2008

the >> button causes mirc to crash.

 Respond  
Hydroxide   -  Feb 14, 2008

This is so awesome. Can someone tell me how to edit it so that I can scroll sideways on the songs list?

 Respond  
brinxy   -  Nov 16, 2007

For most of the functionality, you did a good job. Would be excellent to add a directory without making a new playlist. I would also like to see an add file and remove file option because I have quite a bit of songs loaded in my directory. That would make the playlist option better.

For the coding, not so good. I\'m surprised that it makes it easier for you to understand. /\'s usually tend to make coding look sloppy and confusing in my opinion. I\'d strongly recommend you remove them, but that isn\'t significant. You also lack error checking. (Opening dialogs is an example.)

For the way you handle your files, I think you can improve upon that as well. Your writeini can\'t support 64k or more (going back to large directories). I\'d use hash tables, or just make the writeini command /writeini -n.

I\'d like to see a scroll bar instead of two buttons to seek though the song. That way the user could get more exact with the position. It would be good to make your options into a separate dialog, the actual mp3 dialog itself would look a lot neater. Another thing I noticed in a lot of the mp3s on here, when they have volume seeking in their snippet, is that they skip to a certain percentage instead of scrolling regularly. If you could change your current buttons to a scrollbar as well, that\'d be great.

Perhaps add an id3 editor, and more options as to the display. (Such as size and album for example.)

After that novel, I\'d have to say you put a lot of effort and tried to create a decent mp3 player. You did, and I credit you for that. If you just included some updates and fixes, you\'d have an even better snippet. Very good job.

 Respond  
guest598594   -  Nov 16, 2007

sorry, forgot to rate it :P

8/10

 Respond  
spitfire3292   -  Nov 15, 2007

Also if you guys could rate this I would def. appreciate it :)

 Respond  
spitfire3292   -  Nov 15, 2007

And how did you like the player itself? lol. Sorry you don\'t like the taste of music I put up there. It was just the first couple songs in my playlist :)

 Respond  
SLS10   -  Nov 14, 2007

Though ACDC is epic

 Respond  
SLS10   -  Nov 14, 2007

Uh, this seems random. But some of the songs on that sample playlist are horrible travesties.

 Respond  
guest598594   -  Nov 14, 2007

the bugs rnt rly important, its just for when u click stuff when ur not supposd to :)

 Respond  
spitfire3292   -  Nov 14, 2007

Thanks :) Yeah there just little bugs. It\'s simple to fix, just add an if (!$server) { halt } kinda deal. I can\'t be annoyed t o update it right this second since I\'m kind of busy but when I get some spare time i\'ll update it. And once again, thanks and I\'m glad you like it :)

 Respond  
guest598594   -  Nov 14, 2007

use .timer so it duznt show in status

when u delet a directory, i dont get why u have ppl input the playlist

thats about the only stuff i found bad about it, i love this, u did a great job

on this one, i can actually tell what the features do, and i love the idea of how u output song details where u can customize it

i also like how u say the volume percent in the title, very unique and helpful, i was gonna say u should display current volume, but i looked and u did!

i also like how u can fast forward w/ this, and it updates the time in the title even whe u ff/rw

but one thing, when i click >>, and repeat is checked, it goes to the next song and duznt repeat

also, im gettin these errors:

  • /splay: no such file \'.mp3\' (line 120, script2.mrc)
  • /amsg: not connected to server (line 307, script2.mrc)
  • /splay: no such file \'pause\' (line 199, script2.mrc)

the splay error comes from when its stopped, and i try to hit pause, and i imagine the amsg is when i click quick msg display, and im not connected;two little bugs.

other than that, i rly like this, u did a great job, and im keepin it on my mirc :P

 Respond  
spitfire3292   -  Nov 14, 2007

The /\'s are just my style of coding. It\'s not the neatest. It just keeps me organized. It is also partially how I was taught. I learned /msg instead of msg but also learned if instead of /if. If you get what I mean :\ Anyway thanks for the compliment. I am using it as we speak :P So I hope it proves well for you aswell :) I also made this back in February. So I am a bit better at scripting nowadays. Could be a lot more efficient and have a couple more features added.

 Respond  
guest598594   -  Nov 14, 2007

no need for /\'s

u should add a hsbar to the songs, and did -z the list

havent tested, but im looking forward to, im busy right now, it looks pretyy good

 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.