Baltazar MP3 Player

By BALTAZAR666 on Feb 07, 2007

Simple MP3 Player.Simple to use.

;--------MP3 Player-------
; By Marjan Avramov
;-------------------------
menu menubar {
  Baltazar MP3 Player:/mp3.plaYer
}
dialog mp3.plaYer {
  title "Baltazar MP3 Player"
  size -1 -1 145 220
  option dbu
  button "Beck" 1, 7 30 25 10,
  button "PLay" 2, 44 30 30 10,default
  button "Stop" 3, 85 30 20 10,
  button "Next" 4, 110 30 25 10,
  button "Close" 6, 55 210 20 10, cancel
  text "                 ---- Made By Marjan Avramov ----" 50, 5 200 160 8,
  button "Reset" 7, 44 30 30 10,
  button "Pause" 8, 44 30 30 10,
  edit "00" 9, 10 15 10 10,read
  edit "00" 10, 25 15 10 10,read
  text ":" 11, 22 16 1 10,
  radio "=" 12, 37 17 7 6,
  radio "=" 13, 43 17 7 6,
  radio "=" 14, 49 17 7 6,
  radio "=" 15, 55 17 7 6,
  radio "=" 16, 61 17 7 6,
  radio "=" 17, 67 17 7 6,
  radio "=" 18, 73 17 7 6,
  radio "=" 19, 79 17 7 6,
  radio "=" 20, 85 17 7 6,
  radio "=" 21, 91 17 7 6,
  text  $nopath(%mp3.file), 22, 5 3 135 8
  button "-" 23, 120 20 8 7,
  button "+" 24, 120 12 8 7,
  list 25, 5 50 135 130, hsbar
  button "mp3 Dir" 26, 53 180 30 10
  button "Refresh" 27, 95 180 33 10
  button "Clear" 5, 10 180 36 10,
  text "Play List :" 29, 57 42 20 8, 
  ;  button "" 30, 5 40 48 5,
  ;  button "" 31, 53 40 42 5,
}
alias mp3.clear {
  did -u mp3.player 12
  did -u mp3.player 13
  did -u mp3.player 14
  did -u mp3.player 15
  did -u mp3.player 16
  did -u mp3.player 17
  did -u mp3.player 18
  did -u mp3.player 19
  did -u mp3.player 20
  did -u mp3.player 21
}
alias mp3.disable {
  did -b mp3.player 12
  did -b mp3.player 13
  did -b mp3.player 14
  did -b mp3.player 15
  did -b mp3.player 16
  did -b mp3.player 17
  did -b mp3.player 18
  did -b mp3.player 19
  did -b mp3.player 20
  did -b mp3.player 21
  mp3.clear
}
alias mp3.enable {
  did -e mp3.player 12
  did -e mp3.player 13
  did -e mp3.player 14
  did -e mp3.player 15
  did -e mp3.player 16
  did -e mp3.player 17
  did -e mp3.player 18
  did -e mp3.player 19
  did -e mp3.player 20
  did -e mp3.player 21
}
alias mp3.radio {
  if ($calc(($inmp3.pos * 100) / $inmp3.length ) > 0 ) { mp3.clear | did -c mp3.player 12 }
  if ($calc(($inmp3.pos * 100) / $inmp3.length ) > 10 ) { mp3.clear | did -c mp3.player 13 }
  if ($calc(($inmp3.pos * 100) / $inmp3.length ) > 20 ) { mp3.clear | did -c mp3.player 14 }
  if ($calc(($inmp3.pos * 100) / $inmp3.length ) > 30 ) { mp3.clear | did -c mp3.player 15 }
  if ($calc(($inmp3.pos * 100) / $inmp3.length ) > 40 ) { mp3.clear | did -c mp3.player 16 }
  if ($calc(($inmp3.pos * 100) / $inmp3.length ) > 50 ) { mp3.clear | did -c mp3.player 17 }
  if ($calc(($inmp3.pos * 100) / $inmp3.length ) > 60 ) { mp3.clear | did -c mp3.player 18 }
  if ($calc(($inmp3.pos * 100) / $inmp3.length ) > 70 ) { mp3.clear | did -c mp3.player 19 }
  if ($calc(($inmp3.pos * 100) / $inmp3.length ) > 80 ) { mp3.clear | did -c mp3.player 20 }
  if ($calc(($inmp3.pos * 100) / $inmp3.length ) > 90 ) { mp3.clear | did -c mp3.player 21 }

}
alias mp3.time {
  did -r mp3.plaYer 10 
  if (%sec < 9 ) { did -a mp3.plaYer 10 0 }
  mp3.radio
  if ($inmp3.pos == $inmp3.length) { mp3.stop }
  if ($inmp3 == $true) { did -b mp3.player 5 }
  else { did -e mp3.player 5 }
  set %sec $int($calc($inmp3.pos / 1000 - %min * 60))
  did -a mp3.plaYer 10 %sec
  set %min $int($calc($inmp3.pos / 60000)) | did -r mp3.plaYer 9 |   if (%min < 9 ) { did -a mp3.plaYer 9 0 | did -a mp3.plaYer 9 %min }
}
alias mp3.open {
  /set %mp3.file $file="Select MP3 File" "*.mp3"
  /set %mp3.file " $+ %mp3.file $+ "
  .timeropen off
  did -e mp3.plaYer 2
  did -r mp3.plaYer 22
  did -a mp3.plaYer 22 $nopath(%mp3.file)
  did -r mp3.player 25
  did -a mp3.player 25 $nopath(%mp3.file)
}
alias mp3.init {
  did -h mp3.plaYer 7
  did -h mp3.plaYer 8
  did -b mp3.plaYer 3
  did -b mp3.plaYer 1
  did -b mp3.plaYer 4
  ;  did -b mp3.plaYer 5
  if (%mp3.file == $null) { did -b mp3.plaYer 2 }
  .timermp3 999999999 1 mp3.time
  set %min 0
  mp3.disable
}
alias mp3.stop {
  splay stop
  did -h mp3.plaYer 7
  did -h mp3.plaYer 8
  did -v mp3.plaYer 2
  did -b mp3.plaYer 3
  did -b mp3.plaYer 1
  did -b mp3.plaYer 4
  mp3.disable
}
on *:dialog:mp3.plaYer:init:0: { 
  if (%mp3.list == 1)  { dialog -bs mp3.plaYer -1 -1 122 188 | did -c $dname 29 }
  mp3.init 
  refresh.mp3 
}
;on *:dialog:mp3.plaYer:sclick:1: {
;  splay seek return $calc($inmp3.pos - 10000)
;  did -h mp3.plaYer 2
;  did -h mp3.plaYer 7
;  did -v mp3.plaYer 8
;}
on *:dialog:mp3.plaYer:sclick:2: if ($inmp3 == $false) { splay %mp3.file | did -h mp3.plaYer 2 | did -v mp3.plaYer 8 | did -e mp3.plaYer 3 | did -e mp3.plaYer 1 | did -e mp3.plaYer 4 | mp3.enable }
on *:dialog:mp3.plaYer:sclick:3: { mp3.stop }
;on *:dialog:mp3.plaYer:sclick:4: {
;  splay seek return $calc($inmp3.pos + 10000)
;  did -h mp3.plaYer 2
;  did -h mp3.plaYer 7
;  did -v mp3.plaYer 8
;}
on *:dialog:mp3.plaYer:sclick:5:.timeropen 0 0.1 mp3.open
on *:dialog:mp3.plaYer:sclick:6: /splay stop | .timermp3 off
on *:dialog:mp3.plaYer:sclick:7: {
  splay resume
  did -h mp3.plaYer 7
  did -v mp3.plaYer 8
}
on *:dialog:mp3.plaYer:sclick:8: {
  splay pause
  did -h mp3.plaYer 8
  did -v mp3.plaYer 7
}
alias mp3.test {
  did -h mp3.plaYer 2 
  did -h mp3.plaYer 7
  did -v mp3.plaYer 8
}
alias mp3.plaYer {
  dialog -mid mp3.player mp3.player
}
on *:dialog:mp3.plaYer:sclick:12:splay seek $calc( 0 ) | mp3.test
on *:dialog:mp3.plaYer:sclick:13:splay seek $int($calc((1 * $inmp3.length) / 10 )) | mp3.test
on *:dialog:mp3.plaYer:sclick:14:splay seek $int($calc((2 * $inmp3.length) / 10 )) | mp3.test
on *:dialog:mp3.plaYer:sclick:15:splay seek $int($calc((3 * $inmp3.length) / 10 )) | mp3.test
on *:dialog:mp3.plaYer:sclick:16:splay seek $int($calc((4 * $inmp3.length) / 10 )) | mp3.test
on *:dialog:mp3.plaYer:sclick:17:splay seek $int($calc((5 * $inmp3.length) / 10 )) | mp3.test
on *:dialog:mp3.plaYer:sclick:18:splay seek $int($calc((6 * $inmp3.length) / 10 )) | mp3.test
on *:dialog:mp3.plaYer:sclick:19:splay seek $int($calc((7 * $inmp3.length) / 10 )) | mp3.test
on *:dialog:mp3.plaYer:sclick:20:splay seek $int($calc((8 * $inmp3.length) / 10 )) | mp3.test
on *:dialog:mp3.plaYer:sclick:21:splay seek $int($calc((9 * $inmp3.length) / 10 )) | mp3.test
on *:dialog:mp3.plaYer:sclick:23:vol -p $calc($vol(mp3) - 6500 )
on *:dialog:mp3.plaYer:sclick:24:vol -p $calc($vol(mp3) + 6500 )
on *:dialog:mp3.plaYer:sclick:26:.timer 1 0   set %mp3.dir $sdir="Select your mp3 directory:"
on *:dialog:mp3.plaYer:sclick:27: refresh.mp3
alias refresh.mp3 {
  did -r $dname 25
  set %g.up2 0
  :start
  inc %g.up2
  if ($findfile(%mp3.dir,*.mp3,%g.up2) != $null) { did -a $dname 25 $nopath($findfile(%mp3.dir,*.mp3,%g.up2)) | goto start }
  else halt
}
on *:dialog:mp3.plaYer:dclick:25:{
  /set %mp3.file $findfile(%mp3.dir,*.mp3,$did($dname,25).sel) 
  /set %mp3.file " $+ %mp3.file $+ "
  splay stop 
  set %mp3.sel $did($dname,25).$did($dname,25).sel
  did -a mp3.plaYer 22 $nopath(%mp3.file)
  if ($inmp3 == $false) {
    splay stop 
    splay %mp3.file
    did -h mp3.plaYer 2
    did -v mp3.plaYer 8
    did -e mp3.plaYer 3
    did -e mp3.plaYer 1
    did -e mp3.plaYer 4
    mp3.enable
  }
}
on *:dialog:mp3.plaYer:sclick:29:{
  if ($did(mp3.plaYer,29).state == 1)  { dialog -bs mp3.plaYer -1 -1 122 188 | set %mp3.list 1 } 
  else { dialog -bs mp3.plaYer -1 -1 122 35 | set %mp3.list 0 } 
}
on *:dialog:mp3.plaYer:sclick:1:{
  dec %mp3.sel
  if (%mp3.sel  > 0)  {
    /set %mp3.file $findfile(%mp3.dir,*.mp3,$calc($did($dname,25).$did($dname,25).sel - 1))
    /set %mp3.file " $+ %mp3.file $+ "
    splay stop 
    did -a mp3.plaYer 22 $nopath(%mp3.file)
    if ($inmp3 == $false) {
      splay stop 
      splay %mp3.file
      did -h mp3.plaYer 2
      did -v mp3.plaYer 8
      did -e mp3.plaYer 3
      did -e mp3.plaYer 1
      did -e mp3.plaYer 4
      mp3.enable
    }
  }
}
on *:dialog:mp3.plaYer:sclick:4:{
  inc %mp3.sel
  if (%mp3.sel  < %g.up2)  {
    /set %mp3.file $findfile(%mp3.dir,*.mp3,$calc($did($dname,25).$did($dname,25).sel + 1))
    /set %mp3.file " $+ %mp3.file $+ "
    splay stop 
    did -a mp3.plaYer 22 $nopath(%mp3.file)
    if ($inmp3 == $false) {
      splay stop 
      splay %mp3.file
      did -h mp3.plaYer 2
      did -v mp3.plaYer 8
      did -e mp3.plaYer 3
      did -e mp3.plaYer 1
      did -e mp3.plaYer 4
      mp3.enable
    }
  }
}

Comments

Sign in to comment.
BALTAZAR666   -  Feb 11, 2007

:DDDDDD

 Respond  
RoninWarrior   -  Feb 07, 2007

why do you use mirc to chat for when you have a phone?

 Respond  
leokid   -  Feb 07, 2007

Its look nice and easy to use.
but i don\'t see the point of it, you have programs like winamp and media-player
so using mirc mp3 player is useless.

 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.