mIRC Home    About    Download    Register    News    Help

Print Thread
#33275 30/06/03 11:03 PM
Joined: Apr 2003
Posts: 57
V
Babel fish
OP Offline
Babel fish
V
Joined: Apr 2003
Posts: 57
ok using the following code how can i make it to auto annouce the song i am playing
Code:
 on *:MP3END: { if (%repeat == true) $findfile(%mp3dir,*.mp3,$r(1,$findfile(%mp3dir,*.mp3,0)),splay $1-) }

menu channel {
  My MP3s
  .Song - $iif($insong, $nopath($insong.fname), Nothing at all!!! ) : /halt
  .Position - $mp3pos :/halt
  .-
  .set: .set %mp3dir (C:\my shared folder\)
  .Continuous Play: .set %repeat true
  .Stop Continuous Play: .unset %repeat
  .Shuffle: $findfile(%mp3dir,*.mp3,$r(1,$findfile(%mp3dir,*.mp3,0)),splay $1-)
  .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
 

#33276 01/07/03 01:16 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
.Play:set %mp3 $hfile= " Choose Mp3 " | ame is now listening to: $nopath(%mp3) $+ .
.Stop Playing: /splay stop
.Pause Song: /splay pause
.Resume Playing: /splay resume

#33277 01/07/03 08:01 AM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
amsg i am listening to $nopath($inmp3.fname) $+ .

Last edited by pheonix; 01/07/03 08:02 AM.

new username: tidy_trax

Link Copied to Clipboard