mIRC Home    About    Download    Register    News    Help

Print Thread
#33210 30/06/03 05:11 PM
Joined: Apr 2003
Posts: 57
V
Babel fish
OP Offline
Babel fish
V
Joined: Apr 2003
Posts: 57
ok i got the following script from kingtomato but how can i shuffle all the songs to play one after the other

Code:
 on *:MP3END: { /splay %repeat }

menu channel {
  My MP3s
  .Song - $iif($insong, $nopath($insong.fname), Nothing at all!!! ) : /halt
  .Position - $mp3pos :/halt
  .-
  .Continuous Play: .set %repeat $insong.fname
  .Stop Continuous Play: .unset %repeat
  .Spam: /msg $chan 7 $me 9is playing7  $nopath($insong.fname)  9 with a duration of7  $mp3time using 11m42@77§ 11þ42|å¥Ë®r
  .Stop Playing: /splay stop
  .Pause Song: /splay pause
  .Resume Playing: /splay resume
  .-
  .$submenu($mp3list($$1)) 


}

alias mp3list {
  var %mp3dir = $shortfn(C:\my shared folder\)
  if ($$1 == begin) return -
  else if ($$1 == end) return -
  else if ($findfile(%mp3dir, *.mp3, $$1, 0)) return $nopath($ifmatch) : /splay -p $ifmatch 

}

alias mp3pos {
  var %barlength = 15
  if ($insong) {
    var %length = $sound($insong.fname).length, %pos = $insong.pos, %left = $int($calc((%pos / %length) * %barlength))
    var %pos = $remove($replace($duration($calc($insong.pos / 1000)), mins, m, min, m, secs, s, sec, s), $chr(32))
    var %len = $remove($replace($duration($calc($sound($insong.fname).length / 1000)), mins, m, min, m, secs, s, sec, s), $chr(32))
    var %time = ( $+ %pos $+ / $+ %len $+ )
  }
  else var %left = 0
  return [[ $+ $str($chr(124), %left) $+ $str(-, $calc(%barlength - %left)) $+ ]] %time
}


alias mp3time {
  var %barlength = 15
  if ($insong) {
    var %length = $sound($insong.fname).length, %pos = $insong.pos, %left = $int($calc((%pos / %length) * %barlength))
    var %pos = $remove($replace($duration($calc($insong.pos / 1000)), mins, m, min, m, secs, s, sec, s), $chr(32))
    var %len = $remove($replace($duration($calc($sound($insong.fname).length / 1000)), mins, m, min, m, secs, s, sec, s), $chr(32))
    var %time = ( $+ %len $+ )
  }
  else var %left = 0
  return %time
}
 


#33211 30/06/03 05:15 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
.Shuffle: $findfile(%mp3dir,*.mp3,$r(1,$findfile(%mp3dir,*.mp3,0)),/splay $1-)

on *:MP3END:{
$findfile(%mp3dir,*.mp3,$r(1,$findfile(%mp3dir,*.mp3,0)),/splay $1-)
}

Last edited by pheonix; 30/06/03 05:29 PM.

new username: tidy_trax
#33212 30/06/03 05:23 PM
Joined: Apr 2003
Posts: 57
V
Babel fish
OP Offline
Babel fish
V
Joined: Apr 2003
Posts: 57
thx

#33213 01/07/03 08:15 AM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
np smile


new username: tidy_trax

Link Copied to Clipboard