feed Subscribe to feed
Download scripts for mIRC (snipets, add-ons, scripts and bots) and PHP
20. 03
2007

mIRC mp3 console

Written by: ohav79 - Posted in: mIRC Snipets

This snipet allowed you to play some mp3 songs using your mIRC. You don’t have to use other mp3 player because this snipet has it own console to play your mp3 songs.

The display of this console is very simple but with more function such as control your playlist, etc.

This is the code:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; MP3 Console oyr79™ ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Dialogs

dialog mp3c {
  title "oyr79™ MP3 Console"
  size -1 -1 292 283
  option pixels
  text "", 32, 4 2 98 39, center
  text "", 33, 106 2 182 39
  button "9", 35, 5 68 42 20
  button "4", 36, 53 68 42 20
  button ";", 37, 101 68 42 20
  button "<", 38, 149 68 42 20
  button ":", 39, 197 68 42 20
  button "5", 40, 245 68 42 20
  text "", 43, 110 6 174 16, center
  text "", 44, 110 22 58 16, center
  text "", 45, 168 22 58 16, center
  text "", 46, 226 22 58 16, center
  list 34, 105 43 184 23, size
  text "00:00", 47, 10 8 86 27, center
  list 51, 4 91 284 165, size extsel
  text "Nyandak ada musik", 5, 110 13 174 16, center
  text "", 103, 5 258 282 22, center
  button "", 79, 0 0 0 0, hide ok
  list 41, 3 43 99 23, size
  menu "Kase tunjuk", 11
  item "Volume", 13, 11
  item break, 14, 11
  item "ID3", 15, 11
  item break, 6, 11
  item "Kase sambunyi", 16, 11
  item "Tutup", 66, 11
  menu "Playlist", 52
  item "Tambah file", 53, 52
  item "Tambah folder", 54, 52
  item break, 55, 52
  menu "Load playlist", 56, 52
  item "*.m3u", 104, 56
  item "*.pls", 105, 56
  item "*.bpl", 106, 56
  item "*.b4s", 107, 56
  item break, 57, 52
  item "Simpan playlist", 58, 52
  menu "Simpan playlist sbg...", 59, 52
  item "*.m3u", 77, 59
  item "*.pls", 78, 59
  item "*.b4s", 80, 59
  item break, 60, 52
  item "Hapus file", 61, 52
  item "Kase bersih playlist", 62, 52
  item break, 63, 52
  menu "Se pindah", 65, 52
  item "Ke atas", 69, 65
  item "Ke bawah", 70, 65
  menu "Se urut menurut", 67, 52
  item "Judul", 71, 67
  item "Nama file", 72, 67
  item "Path/nama file", 73, 67
  item "Panjang", 74, 67
  item break, 68, 52
  item "Kase sembunyi", 64, 52
  menu "Pilihan", 1
  menu "Set path ke", 81, 1
  item "Popups", 12, 81
  item "Daftar file", 83, 81
  item "MDX", 84, 81
  item break, 82, 1
  menu "Warna", 17, 1
  menu "Teks", 18, 17
  item "Muka", 85, 18
  item "Bayangan", 86, 18
  item "Terang", 87, 18
  item "3Dlight", 88, 18
  item "Frame", 89, 18
  item "Teks", 90, 18
  item break, 91, 18
  item "mIRC's defaults", 92, 18
  menu "Latar blkg", 19, 17
  item "Muka", 93, 19
  item "Bayangan", 94, 19
  item "Terang", 95, 19
  item "3Dlight", 96, 19
  item "Frame", 97, 19
  item "Teks", 98, 19
  item break, 101, 19
  item "mIRC's defaults", 102, 19
  menu "Metode", 7, 1
  item "Kontinyu", 8, 7
  item "Acak", 9, 7
  item "Lagu yg da pilih", 42, 7
  item break, 26, 7
  item "Ulang2", 10, 7
  item "Loop", 75, 7
  menu "Durasi", 2, 1
  item "Tambah", 3, 2
  item "Kurangi", 4, 2
  menu "Kirim ke", 20, 1
  item "Window aktif", 108, 20
  item break, 109, 20
  item "Channel...", 200, 20
  item "Channel", 21, 20
  item "PV", 22, 20
  item break, 23, 20
  item "Dua2 jo", 24, 20
  item "Ndak ada", 25, 20
  item break, 99, 20
  item "Set pesan", 100, 20
  menu "Tolooong", 27
  item "Readme", 28, 27
  item "Isi", 29, 27
  item break, 30, 27
  item "Tentang", 31, 27
}

dialog mp3id3 {
  title "oyr79™ MP3 Console - ID3"
  size -1 -1 151 123
  option dbu
  edit "", 1, 3 3 146 1
  text "Info MP3: N/A", 2, 4 5 145 8, disabled
  edit "", 3, 3 14 146 1
  text "Judul: N/A", 4, 4 19 141 8
  text "Artis: N/A", 5, 4 29 141 8
  text "Genre: N/A", 7, 4 49 141 8
  text "Track: N/A", 9, 4 59 141 8
  text "Komentar:", 10, 4 79 42 8
  edit "N/A", 11, 2 89 147 32, read multi autovs
  text "Album: N/A", 12, 4 39 141 8
  text "Tahun: N/A", 6, 5 69 140 8
  button "", 8, 0 0 0 0, hide ok
}

dialog mp3volume {
  title "oyr79™ Volume"
  size -1 -1 145 207
  text "Master", 1, 6 3 40 16, disabled
  list 2, 12 18 34 170, size
  text "Wave", 3, 58 3 40 16, disabled
  list 4, 61 18 34 170, size
  text "Midi", 5, 110 3 32 16, disabled
  list 6, 110 18 34 170, size
  check "Mute", 7, 5 188 37 16, push
  check "Mute", 8, 54 188 37 16, push
  check "Mute", 9, 102 188 37 16, push
  button "", 10, 0 0 0 0, hide Ok
}

dialog colors {
  title "oyr79™Warna"
  size -1 -1 96 34
  option dbu
  button "", 1, 4 7 10 10
  button "", 2, 15 7 10 10
  button "", 3, 26 7 10 10
  button "", 4, 37 7 10 10
  button "", 5, 48 7 10 10
  button "", 6, 59 7 10 10
  button "", 7, 70 7 10 10
  button "", 8, 81 7 10 10
  button "", 9, 4 18 10 10
  button "", 10, 15 18 10 10
  button "", 11, 26 18 10 10
  button "", 12, 37 18 10 10
  button "", 13, 48 18 10 10
  button "", 14, 59 18 10 10
  button "", 15, 70 18 10 10
  button "", 16, 81 18 10 10
  box "", 17, 2 0 92 4
  box "", 18, 2 28 92 4
  button "", 19, 0 0 0 0, hide result
  button "", 20, 0 0 0 0, hide ok
}

dialog mp3w {
  title "oyr79™ Mp3 Console"
  size -1 -1 114 15
  option dbu
  edit "", 1, 2 2 110 1
  text "", 2, 2 4 110 8, center, disabled
  edit "", 3, 2 13 110 1
  button "", 4, 0 0 0 0, hide ok
}

;; Events

on *:dialog:mp3c:*:*:{
  if ($devent == init) {
  dialog -t $dname $mp3name
  mp3setmdx
  mp3domdx SetFont $dname 35,36,37,38,39,40 -14 400 Webdings
  mp3domdx SetControlMDX $dname 34,41 trackbar noticks > $mp3mdx(.).bars
  mp3domdx SetBorderStyle $dname 34,41
  mp3domdx SetFont $dname 47 ANSI 25 400 Arial
  mp3domdx SetBorderStyle $dname 32,33,103 clientedge staticedge
  mp3domdx SetBorderStyle $dname 35,36,37,38,39,40 staticedge
  mp3domdx SetFont $dname 5,33,43,44,45,46,51,103 ANSI 12 400 Tahoma
  mp3domdx SetControlMDX $dname 51 listview report rowselect showsel > $mp3mdx(.).views
  did -i $dname 51 1 headerdims 264
  did -i $dname 51 1 headertext Filename
  did -i $dname 41 1 params $vol(master) 0 65535
  mp3color.aux2
  mp3color.aux3
  if ($mp3ret(main,repeat)) did -c mp3c 10
  if ($mp3ret(main,loop)) did -c mp3c 75
  if (%mp3selected) did -c mp3c 42
  elseif (%mp3shuffle) did -c mp3c 9
  else did -c mp3c 8
  if (%mp3duration) did -c mp3c 3
  else did -c mp3c 4
  var %t = $mp3ret(main,show)
  if (%t == 1) var %t = 21
  elseif (%t == 2) var %t = 22
  elseif (%t == 3) var %t = 24
  elseif (%t == 4) var %t = 108
  elseif (%t == 5) var %t = 200
  elseif (%t == 0) var %t = 25
  did -c mp3c %t
  if (!$mp3ret(main,playlist)) did -b mp3c 58
  if ($mp3ret(main,hide)) {
  dialog -s mp3c -1 -1 358 120
  did -c mp3c 64
  }
  mp3ldisp
  if (!$read($mp3.path(mp3f.ml),wn,$inmp3.fname)) {
  did -b mp3c 34,35,37,38,39
  }
  else {
  if (%mp3aux) var %t = $v1
  else {
  var %t = $read($mp3.path(mp3f.ml),wn,$inmp3.fname)
  var %t = $readn
  }
  if (%mp3pause) did -b mp3c 37
  did -c mp3c 51 $calc(%t + 1)
  mp3binfo
  mp3pos
  mp3upd $inmp3.fname
  }
  }
  elseif ($devent == dclick) && ($did == 51) mp3play $calc($did(mp3c,51).sel - 1)
  elseif ($devent == sclick) {
  if ($did == 51) {
  if ($did(mp3c,51).sel) {
  if ($gettok($did(mp3c,51,1),1,32) == rclick) mp3pop
  if ($did(mp3c,51).sel) mp3binfo
  }
  }
  elseif ($did == 34) .splay seek $gettok($did(mp3c,34,1).text,1,32)
  elseif ($did == 35) mp3previous
  elseif ($did == 36) mp3play $iif($did(mp3c,51).sel,$calc($v1 - 1))
  elseif ($did == 37) mp3pause
  elseif ($did == 38) mp3stop
  elseif ($did == 39) mp3next
  elseif ($did == 40) mp3addir
  elseif ($did == 41) {
  var %t = $mixeraux(41)
  vol -v $calc(65535 - %t)
  if ($dialog(mp3volume)) did -i mp3volume 2 1 params %t 0 65535
  }
  }
  elseif ($devent == menu) {
  if ($did == 3) mp3duration 1
  elseif ($did == 4) mp3duration 0
  elseif ($did == 8) mp3method 1
  elseif ($did == 9) mp3method 2
  elseif ($did == 42) mp3method 3
  elseif ($did == 10) mp3repeat $iif($did(mp3c,10).state,0,1)
  elseif ($did == 12) setpoppath
  elseif ($did == 13) mp3volume
  elseif ($did == 15) mp3id3 $read($mp3.path(mp3f.ml),n,$calc($did(mp3c,51).sel - 1))
  elseif ($did == 16) dialog -x mp3c
  elseif ($did == 21) mp3setshow 1
  elseif ($did == 22) mp3setshow 2
  elseif ($did == 24) mp3setshow 3
  elseif ($did == 25) mp3setshow 0
  elseif ($did == 108) mp3setshow 4
  elseif ($did == 200) { mp3setshow 5 | set %desc.chan $?="Kase keluar di #..." }
  elseif ($did == 28) mp3readme
  elseif ($did == 29) mp3help
  elseif ($did == 31) mp3about
  elseif ($did == 53) mp3add
  elseif ($did == 54) mp3addir
  elseif ($did == 58) mp3savepl $mp3ret(main,playlist)
  elseif ($did == 61) if ($did(mp3c,51).sel) mp3delf
  elseif ($did == 62) mp3clear
  elseif ($did == 64) {
  if ($did(mp3c,64).state) {
  mp3write main hide 0
  dialog -s mp3c -1 -1 292 302
  did -u mp3c 64
  }
  else {
  mp3write main hide 1
  dialog -s mp3c -1 -1 292 85
  did -c mp3c 64
  }
  }
  elseif ($did == 66) {
  mp3stop
  dialog -x mp3c
  }
  elseif ($did == 69) if ($did(mp3c,51).sel) mp3upf
  elseif ($did == 70) if ($did(mp3c,51).sel) mp3downf
  elseif ($did == 71) mp3sort 1
  elseif ($did == 72) mp3sort 2
  elseif ($did == 73) mp3sort 3
  elseif ($did == 74) mp3sort 4
  elseif ($did == 75) mp3loop $iif($did(mp3c,75).state,0,1)
  elseif ($did == 77) mp3savepl *.m3u
  elseif ($did == 78) mp3savepl *.pls
  elseif ($did == 80) mp3savepl *.b4s
  elseif ($did == 83) setlistfilespath
  elseif ($did == 84) setmdxpath
  elseif ($did == 85) mp3color text face
  elseif ($did == 86) mp3color text shadow
  elseif ($did == 87) mp3color text hilight
  elseif ($did == 88) mp3color text 3dlight
  elseif ($did == 89) mp3color text frame
  elseif ($did == 90) mp3color text text
  elseif ($did == 92) mp3color text $color($stdc)
  elseif ($did == 93) mp3color back face
  elseif ($did == 94) mp3color back shadow
  elseif ($did == 95) mp3color back hilight
  elseif ($did == 96) mp3color back 3dlight
  elseif ($did == 97) mp3color back frame
  elseif ($did == 98) mp3color back text
  elseif ($did == 100) mp3setmsg $$input(Tags:

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment



*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

About me

Let's share your script here.

Search scripts...

Recent comments