|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
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 ?
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
As of v6.16 you can use $insong.pause.
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
I got that to work.. now to another problem.. i have this line:
.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
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
.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
Last edited by starbucks_mafia; 10/10/04 04:41 PM.
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
Try this: .splay [color:red]$shortfn([/color]$read(mp3list.txt,[color:red]t,[/color]$did(playlist,1).sel)[color:red])[/color]
New username: hixxy
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
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?
Last edited by sparta; 10/10/04 04:56 PM.
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
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
Last edited by tidy_trax; 10/10/04 05:12 PM.
New username: hixxy
|
|
|
|
Joined: Jan 2003
Posts: 2,523
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,523 |
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".
/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
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.
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
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.
New username: hixxy
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
I found it.. but have no clue on how to implant it to my 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:
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
/splay $sfn($read(mp3list.txt,nt,$did(playlist,1).sel))
New username: hixxy
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
nope, same result with that line, all mp3's work but not the one with two space's.. :tongue:
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
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: 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.
New username: hixxy
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
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.
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
To list the mp3s, use: .echo -q $findfile(%mp3dir,*.mp3,0,write gxfiles\mp3list.txt $fn($1-)) Then to play them: splay $sfn($read(gxfiles\mp3list.txt,nt,$did(playlist,1).sel))
Last edited by tidy_trax; 10/10/04 06:40 PM.
New username: hixxy
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
didnt work, it added ? to some of the files.. i guess i give up this one.. :tongue:
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
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.
New username: hixxy
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
they are in the same file, i also tested by remove the -l switch.. so if its local or not didnt mather :tongue:
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
I'm all out of ideas then, sorry.
New username: hixxy
|
|
|
|
|