mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2007
Posts: 157
W
Vogon poet
OP Offline
Vogon poet
W
Joined: Jun 2007
Posts: 157
- using 6.21

can somehow mirc be forced to using $sfile detect multiple file extensions ?

like example for music:

1.
//noop $$sfile( D:\music\some-artist\ $+ *.wma $+ , *.mp3 )
only finds WMA

2.
//noop $$sfile( D:\music\some-artist\ $+ *.wma *.mp3 )
finds nothing

3.
//noop $$sfile( D:\music\some-artist\ $+ *.wma,*.mp3 )
finds only WMA

and if i use only *.mp3 then mirc only gives MP3, WAV and MID.


The harder I chase my dreams the more I experience the time for smiles and tears...
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031
Use semicolons ( ; ) to seperate the file types...

//noop $$sfile(D:\music\some-artist\*.wma;*.mp3)

Joined: Jun 2007
Posts: 157
W
Vogon poet
OP Offline
Vogon poet
W
Joined: Jun 2007
Posts: 157
oh great, thanks.

can you also tell me which types actualy mirc CAN play

coz in help file its only refers to mp3, wav, mid.

but it also plays wma

is there any other it can ?

i see it cant mp4 nor mod


The harder I chase my dreams the more I experience the time for smiles and tears...
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031
I think that's pretty much it except for ogg if I remember right.

~ Edit ~

/help $sound

According to versions.txt, support for WMA and OGG was added with 6.0.

03/02/2002 - mIRC v6.0
..
80. Added WMA/OGG support...

Joined: Jun 2007
Posts: 157
W
Vogon poet
OP Offline
Vogon poet
W
Joined: Jun 2007
Posts: 157
odd it wasnt added by default in dialog O_o

btw, dunno if you know or anyone else...
but im trying to fix an player from one old abandoned script
that was runned on mirc 5.9

but as i crawled thru the code i cam on this identifiers
that seems no longer exist

$inmp3 and $inmp3.fname

is there any replacement to this in 6.2x series ?

~~~ nvm i found it -_-

thanks for help rock

Last edited by WideOpenSpace; 10/10/07 07:17 PM.

The harder I chase my dreams the more I experience the time for smiles and tears...
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031
Welcome. smile

Joined: Jun 2007
Posts: 157
W
Vogon poet
OP Offline
Vogon poet
W
Joined: Jun 2007
Posts: 157
umm not to spam another topic with same related...
i would ask someone who has better logic than me if someone
can clarify this part of script to me what exact it does.

so its about music player (reffering to one that i try restore, so i didnt write this code)

Code:
alias next.end {
  %g = 0
  :loop
  inc %g
  %temp.nextname = $readini $mircdirsystem\mp3.ini MP3 %g
  if (%totalmp3lists <= %g) { if (%mp3repeat) { set %g 0 | if ($dialog(mp3) != $null) { .did -c mp3 14 1 } | goto end } | else { set %g 0 | if ($dialog(mp3) != $null) { .did -c mp3 14 1 } | set %mp3file $readini $mircdirsystem\mp3.ini MP3 1 | halt } }
  if (%mp3file == %temp.nextname) {  if ($dialog(mp3) != $null) { .did -c mp3 14 $calc(%g + 2) } | goto end }
  goto loop
  :end
  %mp3file =  $readini $mircdirsystem\mp3.ini MP3 $calc(%g + 1)
  if ($exists(%mp3file)) { .splay -p %mp3file } | else { next.end2 }
}

alias next.end2 { .timer1342 1 1 next.end }

on *:MP3END:{ next.end }


as far as i understand it does something like:

when song ends it calls the next.end alias
then it loops trough INI file (where all songs are written
in way:
[MP3]
1=HDD:\path\song1.ext
2=...
)

then it sees if total number of songs in INI are
equal or less than %totalmp3lists >> WHY? <<
---
and if %mp3repeat is ON (and nowhere in whole script it is set to on or off...)
it checks 1st line on list where songs are listed in dialog
and then goes to END loop where it reads only 1st line of INI
and plays it again.
---
BUT if %mp3repeat is OFF then it again reads INI for 1st line
and halts >> WHY? <<
---


Last edited by WideOpenSpace; 11/10/07 02:36 AM.

The harder I chase my dreams the more I experience the time for smiles and tears...
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
WideOpenSpaces that script seems to shuffle through "Auto play" the next song but there's simple methods of doing this with on *:MP3END:{

Im not 100% if that's what it does but looks like it and if it is then like I said this can be performed really easy without the use of a .ini file.


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Joined: Jun 2007
Posts: 157
W
Vogon poet
OP Offline
Vogon poet
W
Joined: Jun 2007
Posts: 157
well yeah it does shuffle
but thing is when i have more than 1 file on list
it calls 2nd after first and thats ok

but when i have only 1 song it plays it and stops it
therefore no repeat

and all this happens in this fluffy alias :P
thats why i need someone (if willing) to explain
each procedure so i can put somewhere that crap with
/set %mp3repeat ON

:P


The harder I chase my dreams the more I experience the time for smiles and tears...
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
%mp3repeat doesn't require on or off switch in the script its just if (%mp3repeat) meaning that the result can be anything however to unset it you must "Unset %mp3repeat"

try this..

make sure the alias that calls next.end is like $next.end(off) or /next.end off

Code:
alias next.end {
  if ($1 == on) { %mp3repeat on }
  if ($1 == off) { unset %mp3repeat }
  %g = 0
  :loop
  inc %g
  %temp.nextname = $readini $mircdirsystem\mp3.ini MP3 %g
  if (%totalmp3lists <= %g) { if (%mp3repeat) { set %g 0 | if ($dialog(mp3) != $null) { .did -c mp3 14 1 } | goto end } | else { set %g 0 | if ($dialog(mp3) != $null) { .did -c mp3 14 1 } | set %mp3file $readini $mircdirsystem\mp3.ini MP3 1 | halt } }
  if (%mp3file == %temp.nextname) {  if ($dialog(mp3) != $null) { .did -c mp3 14 $calc(%g + 2) } | goto end }
  goto loop
  :end
  %mp3file =  $readini $mircdirsystem\mp3.ini MP3 $calc(%g + 1)
  if ($exists(%mp3file)) { .splay -p %mp3file } | else { next.end2 }
}

alias next.end2 { .timer1342 1 1 next.end }

on *:MP3END:{ next.end }


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Joined: Jun 2007
Posts: 157
W
Vogon poet
OP Offline
Vogon poet
W
Joined: Jun 2007
Posts: 157
well whatever value it supposed to contain
i still need a map of this alias -_-


The harder I chase my dreams the more I experience the time for smiles and tears...
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
alias next.end {
%g = 0
;var g set to 0
:loop
;goto point called loop
inc %g
;var g incremented by 1
%temp.nextname = $readini $mircdirsystem\mp3.ini MP3 %g
;var temp.nextname stores what it reads from the mp3.ini with g
;being the incremented value from earlier.

if (%totalmp3lists <= %g) { if (%mp3repeat) { set %g 0 | if ($dialog(mp3) != $null) { .did -c mp3 14 1 } | goto end } | else { set %g 0 | if ($dialog(mp3) != $null) { .did -c mp3 14 1 } | set %mp3file $readini $mircdirsystem\mp3.ini MP3 1 | halt } }
;var %totalmp3lists ?? no point of this theres missing part of script
;so lets assume totalmp3list is the total of all mp3s in list of course...
;if mp3repeat var is set then var g is set to 0
;then script checks if the mp3 dialog isnot null if it is then theres a checkmark
;on ID 14 then the script skips the loop and goes to END point "Later in script"
;ELSE if the %mp3repeat is not there then it sets %g to 0 then checks if
;dialog isnot null again then checkmarks ID 14 then sets %mp3file to whatever the
;$readini command calls for.
;>>>>>>>>SCRIPT CONTINUES>>>>><<<<<<<<<<<

if (%mp3file == %temp.nextname) { if ($dialog(mp3) != $null) { .did -c mp3 14 $calc(%g + 2) } | goto end }
;if %mp3file equals to same result as %temp.nextname it checks for if
;mp3 dialog isnot $null then checksmarks id 14 + 2 from old position. then jumps to END
;goto point

goto loop
;goto loop is called again to go back in script and perform mp3 filename reads
:end
;this end point is where the script all leads too in the end once your here
%mp3file = $readini $mircdirsystem\mp3.ini MP3 $calc(%g + 1)
;var %mp3file is set to read the mp3 ini from its current position + 1 "AKA next"
if ($exists(%mp3file)) { .splay -p %mp3file } | else { next.end2 }
;if your mp3file exsits then the file is played, else alias next.end2 is called}


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Joined: Jun 2007
Posts: 157
W
Vogon poet
OP Offline
Vogon poet
W
Joined: Jun 2007
Posts: 157
oh sorry i didnt saw your alias yesterday (was tired as hell)

is it any better than this i posted ?
(i tried now to put 1 song and it also dont loop it) :P


The harder I chase my dreams the more I experience the time for smiles and tears...
Joined: Jun 2007
Posts: 157
W
Vogon poet
OP Offline
Vogon poet
W
Joined: Jun 2007
Posts: 157
also additional question
how to get lenghth and current position of the song ?

the script i have has this:

Code:
alias mp3long { return $asctime($calc($timezone + $int($1)),$2) }

alias mp3timer { var %variadomp3temp = $mp3long($1,H:nn:ss) | return $iif($left(%variadomp3temp,1) == 0,$gettok(%variadomp3temp,2-,58),%variadomp3temp) }

.did -ra dialog id $mp3timer($calc($insong.pos /1000)) of $mp3timer($calc($insong.length /1000))


but it doesnt work and code seems verry messy to me to understand :P


The harder I chase my dreams the more I experience the time for smiles and tears...
Joined: Jun 2007
Posts: 157
W
Vogon poet
OP Offline
Vogon poet
W
Joined: Jun 2007
Posts: 157
yeah i have that but that mp3timer alias is weirdo :P


The harder I chase my dreams the more I experience the time for smiles and tears...
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Originally Posted By: WideOpenSpace
also additional question
how to get lenghth and current position of the song ?

the script i have has this:

Code:
alias mp3long { return $asctime($calc($timezone + $int($1)),$2) }

alias mp3timer { var %variadomp3temp = $mp3long($1,H:nn:ss) | return $iif($left(%variadomp3temp,1) == 0,$gettok(%variadomp3temp,2-,58),%variadomp3temp) }

.did -ra dialog id $mp3timer($calc($insong.pos /1000)) of $mp3timer($calc($insong.length /1000))


but it doesnt work and code seems verry messy to me to understand :P


Wideopenspaces position and lenght are really easy

$insong.pos = the position of current file
$insong.length = The lenght of song.

Now the lenght is produced in a /ms rate i believe anyhoo to get the "time" actual from song you need to divide by 1000

$asctime($calc($insong.length / 1000),n:ss) changes 151751 to 2:31

$asctime($calc($insong.pos / 1000),n:ss) changes current pos from ms to time format.

Now of you want the ability to fastfordward your songs in increments do this...

alias forwards { splay seek $calc($insong.pos + $1) }

Syntax: /forwards Numeric Value of position you want to add

Example

I started my song and im at position 20020 but I want to skip about 4 seconds or so I would maybe type /forwards 900


for the rest look im sure you can find out but if you need help im always lurking


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Joined: Jun 2007
Posts: 157
W
Vogon poet
OP Offline
Vogon poet
W
Joined: Jun 2007
Posts: 157
and if i want to show on dialog with /did -ra
info on current position and overall lenghth
i guess i need alias with short timer that triggers on
next.end

but how to make alias understand that it needs to read
current song ?

(coz alias is not a remote connected with script but external call)


The harder I chase my dreams the more I experience the time for smiles and tears...
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Easy you just need to escape asctime by using !

.timerpos 0 1 /did -ra $dname ID $!asctime($calc($insong.pos / 1000),n:ss)

this will update the pos every second of course when the song stops you need to halt this with mp3 end

then in the mp3 end section

on *:MP3END:{
.timerpos off
}

always add the did -ra diglogname id after .splay like this

NOTE: this is from your previous script.

if ($exists(%mp3file)) { .splay -p %mp3file | .timerpos 0 1 /did -ra dialogname id $!asctime($calc($insong.pos /1000),n:ss) } | else { next.end2 }


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Joined: Jun 2007
Posts: 157
W
Vogon poet
OP Offline
Vogon poet
W
Joined: Jun 2007
Posts: 157
didnt worked :P
but nvm i found on one site good code that made my life so easier in this music things.

my next question would be:

why mirc cant play all mp3 files.

for example one day i downloaded all Batman 1 (1989)
soundtracks of movie.

and out of 20 mirc can play
like 4 of them, the rest it skips and doesnt even
count the song lenghth correct.

and i doubt that user who ripped them of cd
ripped each song in different way...

why is that ?


The harder I chase my dreams the more I experience the time for smiles and tears...

Link Copied to Clipboard