All pastes #585727 Raw Edit

Something

public text v1 · immutable
·published 2007-06-23 12:24 UTC
rendered paste body
menu * {
  -
  Music Player:/dialog -m mp mp |   $findfile(%dir,*,0,did -a mp 11 $nopath($1-)) | did -a mp 8 %x 

}
dialog mp {
  title "mIRC Music Player V1.5"
  size -1 -1 300 500

  button "Play", 1, 21 1 40 20
  button "Pause", 2, 61 1 40 20
  button "Stop", 3, 101 1 40 20


  text "Music Player", 6, 221 6 80 20

  box "", 7, 1 22 298 1

  text "", 8, 1 30 298 20
  Box "Directory For Music", 9, 1 50 298 40
  button "Enter File Directory", 10, 5 65 290 20
  list 11, 1 90 298 200

  button "Display Message", 12, 1 280 149 20
  button "Don't Display", 13, 150 280 149 20

  box "Volume", 14, 1 300 298 40
  button "Vol. Up", 15, 5 315 80 20
  button "Vol. Down", 16, 85 315 80 20
  button "Mute", 17, 165 315 50 20
  edit "", 18, 215 315 80 20, auto hs

  box "Instructions", 19, 1 340 298 100
  box "", 20, 1 440 298 55

  text "Welcome to the mIRC Music Player V1.5. To Begin, Enter Directory, Pick a song and the click Play.", 21, 5 355 280 80  
  text "Made By: Olly`", 22, 5 400 200 20

  box "", 23, 5 448 290 40
  box "", 24, 10 453 280 30
  box "", 25, 15 458 270 20
  box "", 26, 20 463 260 10
}
on *:dialog:mp:sclick:12: { 
  set %dis on
}
on *:dialog:mp:sclick:13: { 
  unset %dis
}
on *:dialog:mp:sclick:23: { 
  dialog -m mpd mpd
  did -a mpd 1 %dis.own
}
on *:dialog:mp:sclick:17: { 
  if (%mute == on) { 
    did -ra mp 18 %old
    unset %old
    /vol -v %old1
    unset %mute
    unset %old1
  }
  else {
    set %old $did(18)
    set %old1 $vol(master)
    did -ra mp 18 Muted.
    /vol -v 0
    set %mute on
  }
}
on *:DIALOG:mp:sclick:15:{ 
  var %a = $calc( $remove($did(mp,18),$chr(37)) + 5 ) 
  if (%a > 100) { halt } 
  did -ra mp 18 %a $+ $chr(37) 
  vol -v $calc( %a / 100 * 65535 ) 
} 
on *:DIALOG:mp:sclick:16:{ 
  var %a = $calc( $remove($did(mp,18),$chr(37)) - 5 ) 
  if (%a < 0) { halt } 
  did -ra mp 18 %a $+ $chr(37) 
  vol -v $calc( %a / 100 * 65535 ) 
}
on *:dialog:mp:sclick:1: { 
  if (%pause == on) { 
    /splay resume
    did -a mp 8 $remove($did(8),- Paused.)
    unset %pause
  }
  else { 
    if (%dis == on) /amsg 12[Music/\Player/\V1.5] - 12Song:4 $sound($insong.fname).title 12 $chr(124) Artist:4 $sound($insong.fname).artist 12 $chr(124) Genre:4 $sound($insong.fname).genre 
    /splay %dir $+ \ $+ $did(11).seltext
    did -a mp 8 $remove($did(11).seltext,.mp3,.wma)
    set %x $did(11).seltext
  }
}
on *:dialog:mp:sclick:2: { 
  /splay pause 
  set %pause on
  did -a mp 8 $did(8) - Paused.
}
on *:dialog:mp:sclick:3: { 
  /splay stop
  did -a mp 8 No Song Selected.
}
on *:dialog:mp:dclick:11: { 
  /splay %dir $+ \ $+ $did(11).seltext
  did -a mp 8 $did(11).seltext
  set %x $did(11).seltext
  if (%dis == on) /amsg 12[Music/\Player/\V1.5] - 12Song:4 $sound($insong.fname).title 12 $chr(124) Artist:4 $sound($insong.fname).artist 12 $chr(124) Genre:4 $sound($insong.fname).genre 
}
on *:dialog:mp:sclick:10: { 
  dialog -m mpf mpf
  /splay stop
}
dialog mpf { 
  title "Music Player: File Directory"
  size -1 -1 800 50

  edit "", 1, 1 1 798 20
  button "Done", 2, 1 21 798 29, cancel
}
on *:dialog:mpf:sclick:2: { 
  set %dir $did(1)
  $findfile(%dir,*,0,did -a mp 11 $nopath($1-))
}