mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
#100161 10/10/04 03:38 PM
Joined: Feb 2003
Posts: 3,412
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,412
If i use splay, then i pause the curent song playing, how can i identify that a song is paused ? $insong return $true if a file is playing, same if its paused, any identifyer that return a value if the file is set on pause ?

#100162 10/10/04 03:47 PM
Joined: Dec 2002
Posts: 2,884
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,884
As of v6.16 you can use $insong.pause.

#100163 10/10/04 04:23 PM
Joined: Feb 2003
Posts: 3,412
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,412
I got that to work.. now to another problem.. i have this line:
Code:
.splay $read(" $+ $mircdir/mp3list.txt $+ ",$did(playlist,1).sel)

and it works just fine. but if the mp3 have the name: '05 file.mp3' then i got an error that the file arent in the mp3 dir.. but it is, so i guess it have problems read the space in the mp3 name, if the mp3 is named '05_file.mp3' it works just fine.. :tongue: by the way, this is my own mp3's, nothing i DL'd from the net wink

#100164 10/10/04 04:37 PM
Joined: Dec 2002
Posts: 2,884
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,884
.splay [color:red]$+(",$read(mp3list.txt, t, $did(playlist,1).sel),")[/color]

The bit I've added is in red. You need quotes around the filename when used in commands but not for identifiers (although they won't cause any harm if you use them anyway), which is why I removed them from inside the call to $read().

Edit: Added t parameter. Good point tidy_trax wink

Last edited by starbucks_mafia; 10/10/04 04:41 PM.
#100165 10/10/04 04:38 PM
Joined: Nov 2003
Posts: 2,321
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,321
Try this:

Code:
.splay [color:red]$shortfn([/color]$read(mp3list.txt,[color:red]t,[/color]$did(playlist,1).sel)[color:red])[/color]

#100166 10/10/04 04:44 PM
Joined: Feb 2003
Posts: 3,412
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,412
none of the codes work.. :tongue:

------------- edit

maybe its cos i have it placed in $mircdir/files/mp3list.txt

but i changed that path in both codes, still no luck, it says
* /splay: no such file 'path' path to the file have space in it..
and i using mirc v:6.03 .. so i must have " $+ - $+ " mustent i ? :tongue:

here's the name of the file:
05 Outkast - Roses.mp3

02 - Scissor Sisters - Take Your Mama Out.mp3 <<-- that one works just fine tho.. so where can the problem be ? i placed them in the same path..

BAH, it was dubble spaces in the name.. where can i find that snipet ? somone that know? confused

Last edited by sparta; 10/10/04 04:56 PM.
#100167 10/10/04 04:50 PM
Joined: Nov 2003
Posts: 2,321
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,321
Maybe there are multiple spaces in the filename? Andy^ made a small snippet that lets you handle multiple spaces in the filename, but I can't remember where I saw it.

Edit: it's on this comment list, but there are 40+ pages, so it might take a while to find wink

Last edited by tidy_trax; 10/10/04 05:12 PM.
#100168 10/10/04 05:31 PM
Joined: Jan 2003
Posts: 2,125
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,125
I was wondering, why is the t switch necessary here? The only reason I can think of is a file called "15" (no extension) or something similar, but I would think that mp3list.txt would only contain filenames ending in ".mp3". If anything, I would use the n switch, to catch cases like "$weird title %with weird chars.mp3".

#100169 10/10/04 05:42 PM
Joined: Dec 2002
Posts: 2,884
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,884
I think I'm going senile. When I made the edit I was confusing the n and t switches. Now that I think about it I'd use both.

#100170 10/10/04 05:53 PM
Joined: Nov 2003
Posts: 2,321
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,321
Heh, I misunderstood the help file, I thought it meant that if the first line contained a number it would not be treated as plain text, thanks.

#100171 10/10/04 06:02 PM
Joined: Feb 2003
Posts: 3,412
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,412
I found it.. but have no clue on how to implant it to my code confused
Code:
alias -l fn {
if (* iswm $1) {
var %r = " $+ $replace($1-,$chr(32),?,\?,\:,??,*,?,$chr(32),*,*?,*,$chr(32),\:,\?)
if (" * iswm %r) return ? $+ $right(%r,-2)
return $right(%r,-1)
}
}
alias -l sfn return $shortfn($replace($1-,?,$chr(32)))

if i try implant it nothing will work.. any help would be great.. :tongue:

#100172 10/10/04 06:11 PM
Joined: Nov 2003
Posts: 2,321
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,321
/splay $sfn($read(mp3list.txt,nt,$did(playlist,1).sel))

#100173 10/10/04 06:21 PM
Joined: Feb 2003
Posts: 3,412
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,412
nope, same result with that line, all mp3's work but not the one with two space's.. :tongue:

#100174 10/10/04 06:27 PM
Joined: Nov 2003
Posts: 2,321
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,321
Does the line have double spaces in the file? If not, then the way you are listing files is the problem, not the way you're playing them.

Edit: the /splay that I gave you was wrong, it should be:
Code:
splay $sfn([color:red]$fn([/color]$read(mp3list.txt,nt,$did(playlist,1).sel)[color:red])[/color])

Last edited by tidy_trax; 10/10/04 06:31 PM.
#100175 10/10/04 06:29 PM
Joined: Feb 2003
Posts: 3,412
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,412
hmm, found the problem, the file are in the txt file with single space, so thats where the problem start, not at play.. :tongue:

write " $+ $mircdirgxfiles/mp3list.txt $+ " $findfile(%mp3dir,*.mp3,%x)

and the same there, dont know where to put: $sfn

i tryed a fev places, but get totaly f*ed up output in the txt file.. :tongue:

Last edited by sparta; 10/10/04 06:33 PM.
#100176 10/10/04 06:37 PM
Joined: Nov 2003
Posts: 2,321
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,321
To list the mp3s, use:

Code:
.echo -q $findfile(%mp3dir,*.mp3,0,write gxfiles\mp3list.txt $fn($1-))


Then to play them:

Code:
splay $sfn($read(gxfiles\mp3list.txt,nt,$did(playlist,1).sel))

Last edited by tidy_trax; 10/10/04 06:40 PM.
#100177 10/10/04 06:55 PM
Joined: Feb 2003
Posts: 3,412
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,412
didnt work, it added ? to some of the files.. i guess i give up this one.. :tongue:

#100178 10/10/04 06:58 PM
Joined: Nov 2003
Posts: 2,321
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,321
The fn and sfn aliases are in the same file as the code that plays and lists the files right? They can only be called from inside that file unless you remove the "-l" from the alias declerations.

#100179 10/10/04 07:11 PM
Joined: Feb 2003
Posts: 3,412
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,412
they are in the same file, i also tested by remove the -l switch.. so if its local or not didnt mather :tongue:

#100180 10/10/04 07:19 PM
Joined: Nov 2003
Posts: 2,321
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,321
I'm all out of ideas then, sorry.

Page 1 of 2 1 2

Link Copied to Clipboard