mIRC Home    About    Download    Register    News    Help

Print Thread
#69193 25/01/04 01:42 AM
M
muk
muk
M
Hey,

I know you guys probably get this from a million people, but I've made a script to just show my mp3 filename, I can't remember where I got part of the code, but I was curious if anyone could help me.

I know there are many scripts out like cmp3 and nmp3, but I don't care if my script remembers what mp3's I played and so on, I just want it to play them, and be easy to edit for others.

Here is the code I have:

menu channel,query {
-
Play Video:{
set %mp3 $$dir="Choose Video" F:\
run %mp3
say mp3 ( $remove($nopath(%mp3),.mp3) | $round($calc($lof(%mp3) / 1048576),2) MB )
unset %format
unset %mp3
}
-
}

I would like to be able to add the length and foldername to this script, I am unsure of how to do it, but if anyone could help that would be great.

Also I don't want it to say

C:\MP3\Eminem-The_Eminem_Show-2002-RNS

Just

Eminem-The_Eminem_Show-2002-RNS

Thanks in advance

Keigan

And I forgot to mention I would like to know how to make it show the size in kilabytes or bytes if possible.

#69194 25/01/04 06:57 AM
Joined: Dec 2002
Posts: 332
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
Code:
  
Menu Channel,Query,Nicklist {
  Mp3's
  .-
  .Play:/set %song1 $sfile($mp3dir,[color:blue] name your sound folder [/color],Play!) | /run -n %song1 | set %songsize $bytes($file(%song1).size,m).suf | set %songlength $asctime($calc(86400 + $round($calc($mp3(%song1).length / 1000),0)),n:ss) | /msg $active  1[ $+ 5 $+ $nopath(%song1) $+ 1] [ $+ 04 $+ %songsize $+ 01] [ $+ 04 $+ %songlength $+ 01]   


you will need to go to options (alt +o) then to sounds then to requests then click the drop down for sound folders: and choose mp3s then use the bar below to locate your mp3 folder and select it .

also look

here
for other ways to display file info

Last edited by Cheech; 25/01/04 07:04 AM.
#69195 25/01/04 02:02 PM
I
Iori
Iori
I
A little optimization: :[/b])
Code:
Menu * {
  Mp3's
  .Play:{
    var %a = $$sfile($mp3dir*.mp3,Choose a song,Play!)
    run -n %a
    msg $active MP3: $+(01[,05,$nopath(%a),01] [04,$bytes($file(%a),m).suf,01] $&
      [04,$gmt($calc($sound(%a).length /1000),nn:ss),01])
  }
}

#69196 25/01/04 02:59 PM
Joined: Dec 2002
Posts: 332
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
thx for the suggestions i had never thought of using the $+() as for the set %song1 i actually use the variable elsewhere was why i just set it for me but yours is very clean compliments and thx for the input smile

#69197 25/01/04 09:45 PM
M
muk
muk
M
Hey,

I put this code in and screwed around with it a bit, but I am having trouble figuring out how to show just the folder and not the whole path

For example now it looks like this:

<muk> mp3 ( F:\Cage-Movies_For_The_Blind_(Retail)-2002-WCR\ | 03-cage-down_the_left_hand_path-wcr | 5.63 MB )

but I want to see it just as

<muk> mp3 ( Cage-Movies_For_The_Blind_(Retail)-2002-WCR | 03-cage-down_the_left_hand_path-wcr | 5.63 MB )

without the F:\ at the start and the \ at the end.

Anyone know how to help.

Thanks

Keigan

#69198 26/01/04 12:30 AM
Joined: Dec 2002
Posts: 1,893
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,893


Link Copied to Clipboard