193sc Mp3



alias mp { if ($dialog(mp)) dialog -v mp | else dialog -md mp mp }
alias mp3data { return $+(",$shortfn($scriptdirmp3data.ini),") }

dialog mp {
  title "193sc Mp3 Player"
  size -1 -1 266 180
  option dbu
  box "Playlist", 1, 6 6 194 89
  list 2, 11 13 185 80, sort extsel
  button "Close", 3, 205 14 22 11, ok cancel
  box "Controls", 4, 7 99 118 44
  button "Rewind", 5, 10 108 34 11
  button "Play", 6, 48 108 34 11
  button "Stop", 7, 25 122 34 11
  button "Pause", 8, 85 108 34 11
  button "Forward", 9, 67 122 34 11
  box "Browse", 10, 8 151 249 24
  button "Mp3 Dir", 11, 11 159 34 11
  button "Refresh", 12, 213 159 34 11
  edit "", 13, 49 159 151 11, read
  box "Volume", 14, 128 99 60 24
  button "+", 15, 131 108 10 11
  button "-", 16, 143 108 10 11
  button "Mute", 17, 160 108 24 11
  box "Tunes Found", 18, 133 125 46 24
  edit "", 19, 136 134 40 11, read
  box "Message", 20, 191 99 71 24
  check "Message in Channel", 21, 197 109 64 10
}

on *:dialog:mp:init:0: { if (%mp.pause == 1) { did -r mp 8 | did -a mp 8 Resume } | if ($vol(master).mute == $true) { did -o mp 17 1 Unmute } | if (%mp.msg == On) { did -c mp 21 } | did -o mp 13 1 %mp.dir | set %mp.found $findfile(%mp.dir, *.mp3,0,did -a mp 2 $nopath($1-)) | did -o mp 19 1 %mp.found }
on *:dialog:mp:dclick:4: { splay %mp.temp | set %mp.play 1 | set %mp.pause 0 | did -r mp 8 | did -a mp 8 Pause | mpmsg }
on *:dialog:mp:sclick:2: { set %mp.file $did(2).seltext | set %mp.temp %mp.dir $+ %mp.file | set %mp.bitrate $mp3(%mp.temp).bitrate | set %mp.length $mplength | set %mp.size $round($calc($lof(%mp.temp) / 1048576),2) }
on *:dialog:mp:sclick:5: { if (%mp.play == 0) { halt } | else { splay seek $calc($inmp3.pos -5000) } }
on *:dialog:mp:sclick:6: { splay %mp.dir $+ %mp.file | set %mp.play 1 | set %mp.pause 0 | did -r mp 8 | did -a mp 8 Pause | mpmsg }
on *:dialog:mp:sclick:7: { splay stop | set %mp.play 0 | set %mp.pause 0 | did -r mp 8 | did -a mp 8 Pause  }
on *:dialog:mp:sclick:8: { if (%mp.play == 0) { halt } | elseif (%mp.pause == 1) { splay resume | set %mp.pause 0 | did -r mp 8 | did -a mp 8 Pause } | elseif ((%mp.play == 1) && (%mp.pause == 0)) { splay pause | set %mp.pause 1 | did -r mp 8 | did -a mp 8 Resume  } }
on *:dialog:mp:sclick:9: { if (%mp.play == 0) { halt } | else { splay seek $calc($inmp3.pos +5000) } | halt }
on *:dialog:mp:sclick:11: { did -r mp 2 | set %mp.dir $sdir="Mp3 directory" c:\ | did -o mp 13 1 %mp.dir | set %mp.found $findfile(%mp.dir, *.mp3,0,did -a mp 2 $nopath($1-)) | did -o mp 19 1 %mp.found }
on *:dialog:mp:sclick:12: { did -r mp 2 | set %mp.found $findfile(%mp.dir, *.mp3,0,did -a mp 2 $nopath($1-)) | did -o mp 19 1 %mp.found }
on *:dialog:mp:sclick:15: { if (%mp.play == 0) { halt } | if ($vol(master).mute == $true) { halt } | else { set %mp.vol $calc($vol(master)+7000) | vol -v %mp.vol | set %mp.vol 0 } }
on *:dialog:mp:sclick:16: { if (%mp.play == 0) { halt } | if ($vol(master).mute == $true) { halt } | else { if ($vol(master) < 7000) { vol -v 0 } | elseif ($vol(master) == 0) { halt } | else { set %mp.vol $calc($vol(master)-7000) | vol -v %mp.vol | set %mp.vol 0  } } }
on *:dialog:mp:sclick:17: { if (%mp.play == 0) { halt } | if ($vol(master).mute == $false) { vol -vu1 | did -o mp 17 1 Unmute } | elseif ($vol(master).mute == $true) { vol -vu2 | did -o mp 17 1 Mute } }
on *:dialog:mp:sclick:21: { if (%mp.msg == On) { set %mp.msg Off } | else { set %mp.msg On } }


alias -l mplength {
  var %mp.len $int($calc($mp3(%mp.temp).length / 1000))
  var %mp.min $int($calc(%mp.len / 60))
  var %mp.sec $calc(%mp.len - (%mp.min * 60))
  if (%mp.min < 10) { set %mp.min 0 $+ %mp.min }
  if (%mp.sec < 10) { set %mp.sec 0 $+ %mp.sec }
  set %mp.len %mp.min $+ : $+ %mp.sec
  return %mp.len
}

alias -l mpmsg { if (%mp.msg == On) ame 1[3:  $sy  3:1] [3:15I am currently listening 4Plays:  $remove(%mp.file,.mp3)  3:1] }

menu channel,menubar {
  -
  MP3 Player:/mp
  -

}
 

Contact

Kekanda69

kekanda69@gmail.com

Melaka,Malaysia

Search site

.::: Dalam Kenangan :::.

Al-Fatihah Kepada Muhd Raudhah Bin Haji Bahari

Sesungguhnya Allah s.w.t telah menetapkan rezeki seseorang dan tiada yang terkecuali. Di sini kita akan sama-sama kongsi kunci rezeki, amalan rezeki, rezeki internet, rezeki pasif, rezeki halal, rezeki berkat dan apa-apa berkaitan menambah rezeki.

© kekanda 2010 All rights reserved.

Make a website for freeWebnode