Sound Pro Music Player

Release your script here.
State:
- Author
- What it does
- Perhaps a little guide.
- Also, if the snippet is of any use to the community, it has a chance of getting posted on the main page, so don't hesitate to submit/ask!

Sound Pro Music Player

Postby PuNkTuReD » Sun Jan 04, 2009 12:21 pm

Sound Pro Music Player
Plays wma wav and mp3 files
2 volume controls and mute control
spam controls - choose which rooms to spam
add single files or whole folders at a time
supports multiple playlists

i currently have 1264 files in my playlist and it loads between 1-2 seconds
Loaded 1264 Files from mylist.txt.
Loaded Files in 00:01 Seconds.

Code: Select all
menu * {
  --[ Sound Pro ]--:soundpro
}
alias soundpro dialog $iif($dialog(sound.pro),-v,-dm) sound.pro sound.pro
alias sound.pro.add.dir {
  set %sound.pro.dir $sdir="Music Directory"
  did -r sound.pro 1
  noop $findfile(%sound.pro.dir,*.mp3;*.wav;*.wma,0,write %sound.pro.play.list $1-)
  sound.pro.play.list
}
alias sound.pro.add.file {
  set -u5 %temp.add.file $sfile(c:\)
  write %sound.pro.play.list $($+(%,temp.add.file),2) 
  did -a sound.pro 1 $nopath(%temp.add.file)
}
alias sound.pro.play.list {
  var %a = 1, %b = $lines($($+(%,sound.pro.play.list),2)), %c = $ticks
  while %a <= %b {
    did -a sound.pro 1 $nopath($read(%sound.pro.play.list, %a))
    inc %a
  }
  did -c sound.pro 1 %sound.pro.songnumber
  if (%b == $null) echo 4 -a %sound.pro.play.list has 0 files in it.
  else echo 4 -a Loaded %b Files from %sound.pro.play.list $+ .
  echo 4 -a Loaded Files in $gmt($round($calc($calc($ticks - %c) / 1000),0),nn:ss) Seconds.
}
alias run.sound.pro.volume.options dialog $iif($dialog(sound.pro.volume.options),-v,-dm) sound.pro.volume.options sound.pro.volume.options
alias sound.pro.advertise {
  if ($($+(%,sound.pro.spam.to),2) == //ame) {
    $($+(%,sound.pro.spam.to),2) %sound.pro.logo 4,1P14,1lays 4,1M14,1p3 4,1W14,1av 4,1a14,1nd 4,1W14,1ma 4,1F14,1iles4,1. Available 4,1@14,1 http://www.hawkee.com/snippet/4866/ %sound.pro.logo
  }
  if ($($+(%,sound.pro.spam.to),2) == Custom) {
    var %a = 1, %b = $lines(SoundProChanPlayList.txt)
    while %a <= %b {
      msg $read(SoundProChanPlayList.txt, %a) %sound.pro.log 4,1P14,1lays 4,1M14,1p3 4,1W14,1av 4,1a14,1nd 4,1W14,1ma 4,1F14,1iles4. Available 4,1@14,1 http://www.hawkee.com/snippet/4866/ %sound.pro.logo 
      inc %a
    }
  }
  if ($($+(%,sound.pro.spam.to),2) == None) echo 4 -a Please choose a spam option if you wish to advertise the player.
}
alias sound.pro.spam {
  if ($($+(%,sound.pro.spam.to),2) == //ame) {
    $($+(%,sound.pro.spam.to),2) %sound.pro.logo %sound.pro.playing 4,1•14,1 $replace($($+(%,sound,.,pro,.,length),2),:,$(14,1) Mins4 $(/ 14,1) ) Secs 4,1•14,1 %sound.pro.songnumber 4,1/14,1 $lines(%sound.pro.play.list) 4,1•14,1 $bytes($file(%sound.pro.song).size,3d).suf %sound.pro.logo
  }
  if ($($+(%,sound.pro.spam.to),2) == Custom) {
    var %a = 1, %b = $lines(SoundProChanPlayList.txt)
    while %a <= %b {
      msg $read(SoundProChanPlayList.txt, %a) %sound.pro.logo %sound.pro.playing 4,1•14,1 $replace($($+(%,sound.pro.length),2),:,$(14,1) Mins4 $(/ 14,1) ) Secs 4,1•14,1 %sound.pro.songnumber 4,1/14,1 $lines(%sound.pro.play.list) 4,1•14,1 $bytes($file(%sound.pro.song).size,3d).suf %sound.pro.logo 
      inc %a
    }
  }
  if ($($+(%,sound.pro.spam.to),2) == None) { }
}
alias run.sound.pro.list.options dialog $iif($dialog(sound.pro.list.options),-v,-dm) sound.pro.list.options sound.pro.list.options
alias sound.pro.channel.list {
  var %a = 1, %b = $chan(0)
  while %a <= %b {
    did -a sound.pro.spam.options 2 $chan(%a)
    inc %a
  }
}
alias sound.pro.custom.list {
  var %a = 1, %b = $lines(SoundProChanPlayList.txt)
  while %a <= %b {
    did -a sound.pro.spam.options 4 $read(SoundProChanPlayList.txt, %a)
    inc %a
  }
}
alias run.sound.pro.help dialog $iif($dialog(sound.pro.help),-v,-dm) sound.pro.help sound.pro.help
alias run.sound.pro.spam.options dialog $iif($dialog(sound.pro.spam.options),-v,-dm) sound.pro.spam.options sound.pro.spam.options
dialog  sound.pro {
  title "((o- Sound Pro -o))"
  size -1 -1 150 20
  option dbu
  list 1, 5 20 140 90, size, hsbar
  button "PLAY", 2, 5 5 30 10
  ; icon 2, 5 0 21 17, $mircdir\ICO\play.ico, large
  button "PAUSE", 3, 40 5 30 10
  ; icon 3, 30 0 21 17, $mircdir\ICO\pause.ico, index, large
  button "RESUME", 4, 80 5 30 10
  ; icon 4, 55 0 21 17, $mircdir\ICO\play.ico, index, large
  button "STOP", 5, 115 5 30 10
  ; icon 5, 80 0 21 17, $mircdir\ICO\stop.ico, index, large
  menu "List" 500
  item "Go To" 510, 500
  item "New List" 504, 500
  item "Load List" 505, 500
  item "Add to list" 501, 500
  item "Remove Selected File" 502, 500
  item "Show List as .txt" 511, 500
  item "Clear List" 503, 500
  item "Close" 506, 500
  menu "Volume" 1000
  item "Open Volume Controls" 1001, 1000
  menu "Spam" 1500
  item "Open Spam Central" 1501, 1500
  menu "Extras" 2600
  item "Show List" 113, 2600
  item "Hide List" 112, 2600
  item break, 115, 2600
  item "Show Extra Controls" 2602, 2600
  item "Hide Extra Controls" 111, 2600
  item break, 114, 2600
  item "Advertise Sound Pro" 2601, 2600
  menu "Help" 2500
  item "F.A.Q." 2501, 2500
  radio "Random", 6, 5 115 35 10
  radio "Loop", 7, 45 115 30 10
  button "<<", 8, 80 115 30 10
  ; icon 8, 105 0 21 17, $mircdir\ICO\prev.ico, index, large
  button ">>", 9, 115 115 30 10
  ; icon 9, 130 0 21 17, $mircdir\ICO\next.ico, index, large
}
on *:dialog:sound.pro:*:*: {
  var %a = $dname, %b = $devent, %c = $did
  if (%b == menu) {
    if (%c = 501) run.sound.pro.list.options
    if (%c = 502) {
      if ($did(sound.pro,1).seltext == $null) echo 4 -a Please highlight a file to remove first.
      else {
        set -u2 %sound.pro.temp.num $did(sound.pro,1,1).sel 
        did -d sound.pro 1 %sound.pro.temp.num
        //write -dl $+ %sound.pro.temp.num %sound.pro.play.list
      }
    }
    if (%c = 510) {
      set %sound.pro.gotonumber $$?"Number"
      if (%sound.pro.gotonumber > $lines(%sound.pro.play.list)) {
        echo 4 -a [Error] You do not have that many songs loaded. 
        echo 4 -a Playlist: %sound.pro.play.list
        echo 4 -a Lines: $lines(%sound.pro.play.list) $+ .
      }
      else {
        did -u sound.pro 1 %sound.pro.songnumber
        did -c sound.pro 1 %sound.pro.gotonumber
      }
    }
    if (%c = 511) run $mircdir $+ %sound.pro.play.list
    if (%c = 503) {
      unset %sound.pro.dir
      did -r sound.pro 1
      write -c %sound.pro.play.list
    }
    if (%c = 504) {
      did -r sound.pro 1 |
      set %sound.pro.play.list $$?"Name Playlist $crlf Including the .txt $crlf Example: MyPlaylist.txt"
      run.sound.pro.list.options
    }
    if (%c = 505) {
      did -r sound.pro 1
      set %sound.pro.play.list $$?"Name Playlist $crlf Including the .txt"
      .!timer 1 8 sound.pro.play.list
    }
    if (%c = 506) {
      dialog -x sound.pro sound.pro
      $iif($?!="Stop playing current song?" == $true,splay stop,)
    }
    if (%c = 1001) run.sound.pro.volume.options
    if (%c = 1501) run.sound.pro.spam.options
    if (%c = 2501) run.sound.pro.help
    if (%c = 2601) sound.pro.advertise
    if (%c = 2602) {
      set %sound.pro.show extras
      dialog -bs sound.pro -1 -1 150 140
    }
    if (%c = 111) {
      set %sound.pro.show list
      dialog -bs sound.pro -1 -1 150 125
    }
    if (%c = 112) {
      unset %sound.pro.show
      dialog -bs sound.pro -1 -1 150 29
      dialog -ev sound.pro 6,7,8,9
    }
    if (%c = 113) {
      set %sound.pro.show list
      dialog -bs sound.pro -1 -1 150 125
    }
  }
  if (%b == sclick) {
    if (%c = 2) {
      if ($did(sound.pro,1).seltext == $null) { echo -a 4Please select a song to play. | halt }
      did -u sound.pro 6,7
      set %sound.pro.random OFF
      set %sound.pro.loop OFF
      set %sound.pro.songnumber $did(sound.pro,1).sel
      splay stop
      set %sound.pro.song.number $did(sound.pro,1).sel
      set %sound.pro.song $read(%sound.pro.play.list, $($+(%,sound,.,pro,.,song,.,number),2))
      splay %sound.pro.song
      set %sound.pro.playing $did(sound.pro,1).seltext
      if (.mp3) || (.wma isin %playing) { set %sound.pro.length $gmt($round($calc($insong.length / 1000),0),nn:ss) | sound.pro.spam }
      else { set %sound.pro.length $gmt($round($calc($inwave.length / 1000),0),nn:ss) | sound.pro.spam }   
    }
    if (%c = 3) splay pause
    if (%c = 4) splay resume
    if (%c = 5) {
      splay stop
      set %sound.pro.loop off
      set %sound.pro.random off
    }
    if (%c = 6) { set %sound.pro.loop OFF | set %sound.pro.random ON
      did -u sound.pro 1 %sound.pro.songnumber
      splay stop
      splay $read(%sound.pro.play.list)
      set %sound.pro.songnumber $readn
      did -c sound.pro 1 %sound.pro.songnumber
      set %sound.pro.playing $nopath($insong.fname)
      set %sound.pro.length $gmt($round($calc($insong.length / 1000),0),nn:ss)
      sound.pro.spam
    }
    if (%c = 7) { set %sound.pro.random OFF | set %sound.pro.loop ON
      if (%sound.pro.dir == $null) && ($did(sound.pro,1).seltext == $null) {
        run.sound.pro.list.options
        halt
      }
      splay stop
      did -u sound.pro 1 %sound.pro.songnumber
      set %sound.pro.loop on
      set %sound.pro.random off
      set %sound.pro.songnumber 1
      did -c sound.pro 1 %sound.pro.songnumber
      splay $read(%sound.pro.play.list, %sound.pro.songnumber)
      set %sound.pro.playing $nopath($insong.fname)
      set %sound.pro.length $gmt($round($calc($insong.length / 1000),0),nn:ss) 
      sound.pro.spam
    }
    if (%c = 8) {
      did -u sound.pro 1
      set %sound.pro.songnumber  $calc($($+(%,sound.pro.songnumber),2) - 1)
      did -c sound.pro 1 %sound.pro.songnumber
      set %sound.pro.playing $did(sound.pro,1).seltext
      splay $read(%sound.pro.play.list, %sound.pro.songnumber)
      if (.mp3 isin %sound.pro.playing) || (.wma isin %sound.pro.playing) {
        set %sound.pro.length $gmt($round($calc($insong.length / 1000),0),nn:ss)
        sound.pro.spam
      }
      else {
        set %sound.pro.length $gmt($round($calc($inwave.length / 1000),0),nn:ss)
        sound.pro.spam
      }
    }
    if (%c = 9) {
      did -u sound.pro 1
      set %sound.pro.songnumber $calc($($+(%,sound.pro.songnumber),2) + 1)
      did -c sound.pro 1 %sound.pro.songnumber
      set %sound.pro.playing $did(sound.pro,1).seltext
      splay $read(%sound.pro.play.list, %sound.pro.songnumber)
      if (.mp3 isin %sound.pro.playing) || (.wma isin %sound.pro.playing) {
        set %sound.pro.length $gmt($round($calc($insong.length / 1000),0),nn:ss)
        sound.pro.spam
      }
      else {
        set %sound.pro.length $gmt($round($calc($inwave.length / 1000),0),nn:ss)
        sound.pro.spam
      }
    }
  }
  if (%b == dclick) {
    if (%c = 1) {
      if (%sound.pro.dir == $null) && ($did(sound.pro,1).seltext == $null) {
        run.sound.pro.list.options
        halt
      }
      else {
        splay stop
        set %sound.pro.songnumber $did(sound.pro,1).sel
        set %sound.pro.song $read(%sound.pro.play.list, $($+(%,sound.pro.songnumber),2))
        splay %sound.pro.song
        set %sound.pro.playing $did(sound.pro,1).seltext
        if (.mp3 isin %sound.pro.playing) || (.wma isin %sound.pro.playing) {
          set %sound.pro.length $gmt($round($calc($insong.length / 1000),0),nn:ss)
          sound.pro.spam
        }
        else {
          set %sound.pro.length $gmt($round($calc($inwave.length / 1000),0),nn:ss)
          sound.pro.spam
        }   
      }
    }
  }
  if (%b == rclick) {
    if ($mouse.key & 16) dialog -dm sound.pro.list.options sound.pro.list.options
  }
  if (%b == init) { 
    sound.pro.play.list
    did -z $dname 1
    did -c sound.pro 1 %sound.pro.songnumber
    if (%sound.pro.show == list) dialog -bs sound.pro -1 -1 150 125
    if (%sound.pro.show == extras) dialog -bs sound.pro -1 -1 150 140
  }
}
dialog sound.pro.list.options {
  title "((o- Playlist-Central -o))"
  size -1 -1 100 30
  option dbu
  text "Which would you like to add?", 2, 15 5 92 10
  button "Folder", 3, 5 15 43 10,
  button "File", 4, 52 15 43 10,
}
on *:dialog:sound.pro.list.options:sclick:*: {
  var %a = dialog -x sound.pro.list.options sound.pro.list.options
  if $did = 3 {
    %a
    sound.pro.add.dir
  }
  if $did = 4 {
    %a
    sound.pro.add.file
  }
}
dialog sound.pro.volume.options {
  title "((o- Volume-Central -o))"
  size -1 -1 200 62
  option dbu
  radio "Mute", 1, 5 5 30 8
  scroll "", 2, 5 25 190 10, horizontal, range 00000 65535
  scroll "", 3, 5 45 190 10, horizontal, range 00000 65535
  text "Mp3 Midi Wav Volume:", 4, 5 17 90 8
  text "Master Volume:", 5, 5 38 90 8
  text "", 6, 180 17 30 8
  text "", 7, 180 38 30 8
}
on *:dialog:sound.pro.volume.options:*:*: {
  var %a = $dname, %b = $devent, %c = $did
  if (%b == sclick) {
    if (%c = 1) {
      if (%sound.pro.mute == $null) {
        var %a = sound.pro.volume.options
        set %sound.pro.mute mute
        vol -u2v
        did -ra sound.pro.volume.options 1 Mute
        did -u sound.pro.volume.options 1
        did -c sound.pro.volume.options 2,3 %sound.pro.master.vol
        did -a %a 6 %sound.pro.vol
        did -a %a 7 %sound.pro.master.vol
        .halt
      }
      if (%sound.pro.mute == mute) {
        var %a = sound.pro.volume.options
        vol -u1v
        did -ra sound.pro.volume.options 1 UnMute
        did -c sound.pro.volume.options 1
        did -c sound.pro.volume.options 2,3 00000
        did -a %a 6 0
        did -a %a 7 0
        unset %sound.pro.mute
        .halt
      }
    }
  }
  if (%b == scroll) {
    if (%c = 2) {
      did -a sound.pro.volume.options 6 $did(sound.pro.volume.options,2).sel
      set %sound.pro.vol $did(sound.pro.volume.options,2).sel
      vol -wmp %sound.pro.vol
      if (%sound.pro.master.vol <= %sound.pro.vol) {
        did -c sound.pro.volume.options 3 %sound.pro.vol
        did -a sound.pro.volume.options 7 $did(sound.pro.volume.options,2).sel
      }
    }
    if (%c = 3) {
      did -a sound.pro.volume.options 6 $did(sound.pro.volume.options,3).sel
      did -a sound.pro.volume.options 7 $did(sound.pro.volume.options,3).sel
      set %sound.pro.master.vol $did(sound.pro.volume.options,3).sel
      set %sound.pro.vol %sound.pro.master.vol
      vol -v %sound.pro.master.vol
      did -c sound.pro.volume.options 2 %sound.pro.master.vol
      .halt
    }
  }
  if (%b == init) {
    if (%sound.pro.mute == $null) {
      var %a = sound.pro.volume.options
      did -c %a 1
      did -ra %a 1 UnMute
      did -a %a 6 0
      did -a %a 7 0
    }
    else {
      var %a = sound.pro.volume.options
      did -a %a 6 %sound.pro.vol
      did -a %a 7 %sound.pro.master.vol
      did -c %a 2 %sound.pro.vol
      did -c %a 3 %sound.pro.master.vol
    }
  }
}
dialog sound.pro.spam.options {
  title "((o- Spam-Central -o))"
  size -1 -1 250 86
  option dbu
  text "Available Channels:", 1, 6 5 50 10,
  list 2, 5 15 120 50, size, vsbar,
  text "Custom List:", 3, 127 5 50 10,
  list 4, 125 15 120 50, size, vsbar,
  text "Play To:", 5, 6 71 30 8,
  radio "All", 6, 35 71 30 8,
  radio "Custom", 7, 65 71 30 8,
  radio "None", 8, 95 71 30 8,
  button "Clear List", 9, 215 70 30 10,
  button "Remove Chan", 10, 170 70 40 10,
  button "Add Chan", 11, 125 70 40 10,
}
on *:dialog:sound.pro.spam.options:*:*: {
  var %a = $dname, %b = $devent, %c = $did
  if (%b == init) {
    sound.pro.channel.list
    sound.pro.custom.list
    if (%sound.pro.spam.to == //ame) did -c sound.pro.spam.options 6
    if (%sound.pro.spam.to == Custom) did -c sound.pro.spam.options 7
    if (%sound.pro.spam.to == None) did -c sound.pro.spam.options 8
  }
  if (%b == sclick) {
    if (%c = 2) did -u sound.pro.spam.options 4
    if (%c = 4) did -u sound.pro.spam.options 2
    if (%c = 6) set %sound.pro.spam.to //ame
    if (%c = 7) set %sound.pro.spam.to Custom
    if (%c = 8) {
      did -r sound.pro.spam.options 4 
      write -c SoundProChanPlayList.txt
      set %sound.pro.spam.to None
    }
    if (%c = 9) {
      did -r sound.pro.spam.options 4
      write -c SoundProChanPlayList.txt
    }
    if (%c = 10) {
      write -ds $did(sound.pro.spam.options,4).seltext SoundProChanPlayList.txt
      did -r sound.pro.spam.options 4
      sound.pro.custom.list
    }
    if (%c = 11) {
      did -a sound.pro.spam.options 4 $did(sound.pro.spam.options,2).seltext 
      write SoundProChanPlayList.txt $did(sound.pro.spam.options,2).seltext
    }
  }
  if (%b == dclick) {
    if (%c = 2) {
      did -r sound.pro.spam.options 4
      write SoundProChanPlayList.txt $did(sound.pro.spam.options,2).seltext
      sound.pro.custom.list
    }
    if (%c = 4) {
      write -ds $did(sound.pro.spam.options,4).seltext SoundProChanPlayList.txt
      did -r sound.pro.spam.options 4
      sound.pro.custom.list
    }
  }
}
dialog sound.pro.help {
  title "((o- Help -o))"
  size -1 -1 200 200
  option dbu
  list 1, 5 5 190 190, size, hsbar
}
on *:dialog:sound.pro.help:init:*: {
  var %a = did -a sound.pro.help 1
  %a Firstly Thank You For Using ((o- Sound-Pro -o))
  %a Made by: PuNkTuReD,14/09/2008
  %a ------------------------------------------------------------------------------------------
  %a Frequently Asked Questions:
  %a ----------------------------------------------------------------------
  %a Question: Where is my playlist?
  %a Answer: Go to "Extras" - then "Show List".
  %a ----------------------------------------------------------------------
  %a Question: Why is there two volume controls?
  %a Answer: The top volume control is for Mp3 Midi and Wav files.
  %a The bottom volume control is your systems master volume.
  %a ----------------------------------------------------------------------
  %a Question: Random and Loop modes?
  %a Answer: These play modes can be found by clicking "Show Extra Controls"
  %a Which can be found in the "Extras" Menu.
  %a ----------------------------------------------------------------------
  %a Question: What about "Next" and "Back" buttons?
  %a Answer: These can also be found by clicking "Show Extra Controls"
  %a Which can be found in the "Extras" Menu.
  %a ----------------------------------------------------------------------
}
on 1:waveend: {
  if (%sound.pro.random == on) {
    set %sound.pro.playing $read(%sound.pro.play.list) 
    splay %sound.pro.playing
    set %sound.pro.songnumber $readn
    did -u sound.pro 1
    set %sound.pro.playing $nopath($insong.fname) 
    if (.mp3 isin %sound.pro.playing) || (.wma isin %sound.pro.playing) {
      set %sound.pro.playing $nopath($insong.fname)
      set %sound.pro.length $gmt($round($calc($insong.length / 1000),0),nn:ss) 
      did -c sound.pro 1 %sound.pro.songnumber
      sound.pro.spam
    }
    if (.wav isin %sound.pro.playing) {
      set %sound.pro.playing $nopath($inwave.fname)
      set %sound.pro.length $gmt($round($calc($inwave.length / 1000),0),nn:ss)
      did -c sound.pro 1 %sound.pro.songnumber 
      sound.pro.spam
    }
  }
  if (%sound.pro.loop == on) {
    if (.mp3 isin %sound.pro.playing) || (.wma isin %sound.pro.playing) {
      inc %sound.pro.songnumber
      splay $read(%sound.pro.play.list, %sound.pro.songnumber)
      set %sound.pro.playing $nopath($insong.fname)
      set %sound.pro.length $gmt($round($calc($insong.length / 1000),0),nn:ss)
      did -u sound.pro 1
      did -c sound.pro 1 %sound.pro.songnumber
      sound.pro.spam
    }
    if (.wav isin %sound.pro.playing) {
      inc %sound.pro.songnumber
      splay $read(%sound.pro.play.list, %sound.pro.songnumber)
      set %sound.pro.playing $nopath($insong.fname)
      set %sound.pro.length $gmt($round($calc($inwave.length / 1000),0),nn:ss)
      did -u sound.pro 1
      did -c sound.pro 1 %sound.pro.songnumber
      sound.pro.spam
    }
  }
  if (%sound.pro.random == off) && (%sound.pro.loop == off) {
    set %sound.pro.playing No Song Playing
    set %sound.pro.length 00:00
  }
}
on *:mp3end: {
  if (%sound.pro.random == on) {
    set %sound.pro.playing $read(%sound.pro.play.list) 
    splay %sound.pro.playing
    set %sound.pro.songnumber $readn
    $iif($dialog(sound.pro),did -u sound.pro 1)
    set %sound.pro.playing $nopath($insong.fname) 
    if (.mp3 isin %sound.pro.playing) || (.wma isin %sound.pro.playing) {
      set %sound.pro.playing $nopath($insong.fname)
      set %sound.pro.length $gmt($round($calc($insong.length / 1000),0),nn:ss) 
      $iif($dialog(sound.pro),did -c sound.pro 1 %sound.pro.songnumber)
      sound.pro.spam
    }
    if (.wav isin %sound.pro.playing) {
      set %sound.pro.playing $nopath($inwave.fname)
      set %sound.pro.length $gmt($round($calc($inwave.length / 1000),0),nn:ss)
      $iif($dialog(sound.pro),did -c sound.pro 1 %sound.pro.songnumber)
      sound.pro.spam
    }
  }
  if (%sound.pro.loop == on) {
    if (.mp3 isin %sound.pro.playing) || (.wma isin %sound.pro.playing) {
      inc %sound.pro.songnumber
      splay $read(%sound.pro.play.list, %sound.pro.songnumber)
      set %sound.pro.playing $nopath($insong.fname)
      set %sound.pro.length $gmt($round($calc($insong.length / 1000),0),nn:ss)
      $iif($dialog(sound.pro),did -u sound.pro 1)
      $iif($dialog(sound.pro),did -c sound.pro 1 %sound.pro.songnumber)
      sound.pro.spam
    }
    if (.wav isin %sound.pro.playing) {
      inc %sound.pro.songnumber
      splay $read(%sound.pro.play.list, %sound.pro.songnumber)
      set %sound.pro.playing $nopath($insong.fname)
      set %sound.pro.length $gmt($round($calc($inwave.length / 1000),0),nn:ss)
      $iif($dialog(sound.pro),did -u sound.pro 1)
      $iif($dialog(sound.pro),did -c sound.pro 1 %sound.pro.songnumber)
      sound.pro.spam
    }
  }
  if (%sound.pro.random == off) && (%sound.pro.loop == off) {
    set %sound.pro.playing No Song Playing
    set %sound.pro.length 00:00
  }
}
on 1:unload: {
  var %a = unset 
  %a %sound.pro.vol 65535
  %a %sound.pro.master.vol 65535
  %a %sound.pro.song
  %a %sound.pro.playing
  %a %sound.pro.length 00:00
  %a %sound.pro.song.number 1
  %a %sound.pro.dir
  %a %sound.pro.spam.to None
  %a %sound.pro.play.list
  %a %sound.pro.loop OFF
  %a %sound.pro.random OFF
  %a %sound.pro.songnumber 1
  %a %sound.pro.mute none
  %a %sound.pro.logo
}
/* Sound Pro - PuNkTuReD */
PuNkTuReD
 

Return to Mirc Scripting Release

Who is online

Users browsing this forum: No registered users and 1 guest

cron