mIRC Home    About    Download    Register    News    Help

Print Thread
#126917 06/08/05 11:35 AM
Joined: Sep 2003
Posts: 29
S
sopia Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2003
Posts: 29
I have this code for playing mp3songs, the problem is it cannot play a filename with spaces in it, so how to make it play filename with or without spaces.
code:
on *:MP3END:{
var %num = $findfile($mp3dir,*.mp3,0)
if (%num) { var %song = $findfile($mp3dir,*.mp3,$rand(1,%num)) }
/.sound #mychannel %song
}
appreciate if u can help me out.
confused

#126918 06/08/05 12:11 PM
Joined: Jul 2005
Posts: 40
K
Ameglian cow
Offline
Ameglian cow
K
Joined: Jul 2005
Posts: 40
use $shortfn ^^

Code:
on *:MP3END:{
var %num = $findfile($mp3dir,*.mp3,0)
if (%num) { var %song = $shortfn($findfile($mp3dir,*.mp3,$rand(1,%num))) }
/.sound #mychannel %song
}


I think.


j0k3r @ k4s.ch
#126919 06/08/05 12:21 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
$findfile has a shortfn property by the way.

$findfile(....).shortfn


Gone.
#126920 07/08/05 02:46 AM
Joined: Sep 2003
Posts: 29
S
sopia Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2003
Posts: 29
If i use $shortfn i will not get the whole filename display on the channel, what i want is to be able the play the filename with or without spaces. Any ideas please.


Keep learning everyday, you'll be a genius.
#126921 07/08/05 04:31 AM
Joined: Sep 2004
Posts: 200
I
Fjord artisan
Offline
Fjord artisan
I
Joined: Sep 2004
Posts: 200
use "filename". i.e: var %file = $+(",%file,")


Link Copied to Clipboard