mIRC Home    About    Download    Register    News    Help

Print Thread
#31651 23/06/03 01:39 PM
Joined: Apr 2003
Posts: 300
A
andymps Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Apr 2003
Posts: 300
Does anyone know how to make mirc search your hardrive and then list all the mp3 in a txt, and then how to make it search by a key word?? confused


Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
#31652 23/06/03 03:04 PM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Try here.

#31653 23/06/03 05:59 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
alias mp3list {
/write -c mp3list.txt ---[mp3 list]---
$findfile(C:\,*.mp3,0,/write mp3list.txt $nopath($1-))
}
alias findmp3 {
var %i 1
while ($read(mp3list.txt,%i) != $null) {
if (* $+ $1- $+ * iswm $read(mp3list.txt,%i)) {
//echo -a $read(mp3list.txt,%i)
}
inc %i
}
}
usage:
/mp3list - to make the list
/findmp3 blah - this would echo any mp3's with blah in the name
just change echo to message or whatever(if you dont want echo)
put in remote - alt+r
tested: /findmp3 flip

flip n fill - dance with somebody.mp3
flip n fill - nessaja.mp3
flip n fill - field of dreams.mp3
flip n fill - shooting star.mp3
pornkings vs. flip n fill - shake ya shimmy.mp3

p.s. unless you have a very fast computer it will take a while to make the list frown
also a hashtable would be much faster, so ask me if ya want that smile

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

new username: tidy_trax
#31654 23/06/03 08:31 PM
Joined: Apr 2003
Posts: 300
A
andymps Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Apr 2003
Posts: 300
Thanx lots man i realy apriciate it laugh


Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
#31655 23/06/03 08:42 PM
Joined: Apr 2003
Posts: 300
A
andymps Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Apr 2003
Posts: 300
Hmmm right also how do u get it to send one of the listed mp3's to a person but if the mp3 is out side the mirc dir
and how do u can u calculate the duration of and mp3/wav etc

Last edited by andymps; 23/06/03 08:45 PM.

Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
#31656 23/06/03 08:43 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
hashtable one:

alias mp3list {
$findfile(C:\,*.mp3,0,/hadd -m mp3list $replace($nopath($1-),$chr(32),_))
}
alias findmp3 {
var %i 1
while ($hfind(mp3list,*,%i,w) != $null) {
if ($1- iswm $hfind(mp3list,*,%i,w)) {
//echo -a $replace($hfind(mp3list,*,%i,w),_,$chr(32))
}
inc %i
}
}


new username: tidy_trax
#31657 23/06/03 08:44 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
ive never used dcc sorry


new username: tidy_trax
#31658 23/06/03 08:48 PM
Joined: Apr 2003
Posts: 300
A
andymps Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Apr 2003
Posts: 300
do u know the "and how do u can u calculate the duration of and mp3/wav etc" bit by anychanse ?


Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
#31659 24/06/03 12:54 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
This will take seconds, and make it into the hour:minute format..

Code:
alias mp3length {
  var %totalTime = $1
  if (%totalTime >= 60) var %hours = $int($calc(%totalTime / 60))
  else var %hours = 0
  var %totalTime = $calc(%totalTime - (%hours * 60))
  var %minutes = $str(0, $calc(2 - $len(%totalTime))) $+ %totalTime
  return %hours $+ : $+ %minutes
}


To get postion, use $mp3length($inSong.pos)
To get the length of the song, use $mp3length($sound($insong.fname).length)



-KingTomato
#31660 24/06/03 07:43 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
i think his might be better this is easier=\

alias mp3pos {
//echo -a $duration($calc($inmp3.pos / 1000))
}
/mp3pos returns it in
xminutesxxseconds format


new username: tidy_trax
#31661 25/06/03 12:57 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
i did forget the /1000 onm my alias, but when was the last time you saw winamp or WMPlayer use 3mins 26secs format on their media files... 0:00 much better imo


-KingTomato
#31662 25/06/03 09:12 AM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
alias mp3pos {
//echo -a $replace($remove($duration($calc($inmp3.pos / 1000)),mins,secs),$chr(32),:)
}
easily solved?


new username: tidy_trax
#31663 26/06/03 01:53 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
not exactly--

What if you have 3 mins 2secs? Now you just have 3:2 not 3:02


-KingTomato
#31664 03/07/03 03:22 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
alias mp3pos {
  set %length $calc($int($calc($mp3(%mp3).length / 1000)) / 60)
  set %mins $int(%length)
  set %secs $calc(%length - %mins)
  set %secs $round($calc(%secs * 60),0)
  if (%mins < 10) { %mins = $+(0,%mins) }
  if (%secs < 10) { %secs = $+(0,%secs) }
  return $+(%mins,:,%secs)
}


Link Copied to Clipboard