South Park Script — File Browser

SouthParkScriptv1.10 / SouthParkScriptv1.10 / Sout Park Script / mircamp10.mrc

mircamp10.mrc — 2.49 KB — Download this file

menu status,channel,query {
  mIRCAmp v1.0:dialog -m mircamp mircamp
}
dialog mircamp {
  title "mIRCAmp v1.0"
  size 0 67 225 150
  box "", 1, 5 5 215 100
  list 2, 10 15 205 90, sort
  box "", 3, 5 105 130 35
  button "<", 4, 10 115 20 20, ok
  button "Play", 5, 30 115 35 20, ok
  button ">", 6, 65 115 20 20, ok
  button "Eject", 7, 95 115 35 20, ok
  button "", 8, 1000000 1000000 -1000000 -1000000, ok
}
on *:dialog:mircamp:init:*:{
  if %mp3directory = $null .timer 1 0 eject
  %mp3number2 = 1
  did -r mircamp 2
  :loop
  %mp3file2 = $findfile(%mp3directory,*.mp3,%mp3number2)
  if %mp3file2 = $null {
    did -c mircamp 2 %mp3number
    halt
  }
  did -a mircamp 2 $nopath($remove(%mp3file2,.mp3))
  inc %mp3number2
  goto loop
}
on *:dialog:mircamp:sclick:*:{
  if $did = 2 {
    %mp3number = $did(2).sel
    %mp3file = %mp3directory $+ $did(2,%mp3number) $+ .mp3
  }
  if $did = 4 {
    dec %mp3number
    did -c mircamp 2 %mp3number
    %mp3file = %mp3directory $+ $did(2,%mp3number) $+ .mp3
    %mp3check = $isfile(%mp3file)
    if %mp3check = $false { inc %mp3number }
    %mp3file = %mp3directory $+ $did(2,%mp3number) $+ .mp3
  }
  if $did = 5 {
    if %mp3file = $null halt
    run -n %mp3file
    if $server = $null echo Playing: 8,2 $nopath($replace($remove(%mp3file,.mp3),_,$chr(0160)))  - 4,2mIRC Amp v1.08,4 By RuG RaT
    else amsg Playing: 8,2 $nopath($replace($remove(%mp3file,.mp3),_,$chr(0160)))  - 4,2mIRC2Amp v1.08,2 By RuG RaT
  }
  if $did = 6 {
    inc %mp3number
    did -c mircamp 2 %mp3number
    %mp3file = %mp3directory $+ $did(2,%mp3number) $+ .mp3
    %mp3check = $isfile(%mp3file)
    if %mp3check = $false { dec %mp3number }
    %mp3file = %mp3directory $+ $did(2,%mp3number) $+ .mp3
  }
  if $did = 7 {
    .timer 1 0 eject
  }
}
on *:dialog:mircamp:dclick:2:{
  %mp3number = $did(2).sel
  %mp3file = %mp3directory $+ $did(2,%mp3number) $+ .mp3
  run -n %mp3file
    if $server = $null echo Playing: 8,2 $nopath($replace($remove(%mp3file,.mp3),_,$chr(0160)))  - 4,2mIRC Amp v1.08,4 By RuG RaT
    else amsg Playing: 8,2 $nopath($replace($remove(%mp3file,.mp3),_,$chr(0160)))  - 4,2mIRC2Amp v1.08,2 By RuG RaT
}
alias eject {
  %mp3directory = $sdir"Select Mp3 Directory"
  %mp3number = 1
  did -r mircamp 2
  :loop
  %mp3file = $findfile(%mp3directory,*.mp3,%mp3number)
  if %mp3file = $null {
    unset %mp3number
    halt
  }
  did -a mircamp 2 $nopath($remove(%mp3file,.mp3))
  inc %mp3number
  goto loop
}