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,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
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,.) }
#100162 10/10/04 03:47 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
As of v6.16 you can use $insong.pause.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
#100163 10/10/04 04:23 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#100164 10/10/04 04:37 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
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 wink

Last edited by starbucks_mafia; 10/10/04 04:41 PM.

Spelling mistakes, grammatical errors, and stupid comments are intentional.
#100165 10/10/04 04:38 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Try this:

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


New username: hixxy
#100166 10/10/04 04:44 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
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? confused

Last edited by sparta; 10/10/04 04:56 PM.

if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#100167 10/10/04 04:50 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
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 wink

Last edited by tidy_trax; 10/10/04 05:12 PM.

New username: hixxy
#100168 10/10/04 05:31 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
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
#100169 10/10/04 05:42 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
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.
#100170 10/10/04 05:53 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
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
#100171 10/10/04 06:02 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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:


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#100172 10/10/04 06:11 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
/splay $sfn($read(mp3list.txt,nt,$did(playlist,1).sel))


New username: hixxy
#100173 10/10/04 06:21 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
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,.) }
#100174 10/10/04 06:27 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
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:
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.

New username: hixxy
#100175 10/10/04 06:29 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
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,.) }
#100176 10/10/04 06:37 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
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.

New username: hixxy
#100177 10/10/04 06:55 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
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,.) }
#100178 10/10/04 06:58 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
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
#100179 10/10/04 07:11 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
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,.) }
#100180 10/10/04 07:19 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
I'm all out of ideas then, sorry.


New username: hixxy
Page 1 of 2 1 2

Link Copied to Clipboard