mIRC Home    About    Download    Register    News    Help

Print Thread
#12460 22/02/03 06:39 PM
Joined: Feb 2003
Posts: 27
L
Lowest Offline OP
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Feb 2003
Posts: 27
sorry to post again but no one answered when i replied in my other post

Code:
alias RemoveM3u { 
  var %m3u = $line(@filelist,N)
  while (%m3u > 0) {
    if (*.mp3* !iswm $line(@filelist,%m3u)) || (*.ogg* !iswm $line(@filelist,%m3u)) { dline @filelist %m3u | did -d player 8 %m3u }
    dec %m3u
  }
}   


this never worked so i tried to do this

Code:
alias RemoveM3u { 
  set %rme.fle .mp3 .ogg
  var %m3u = $line(@filelist,N)
  var %pup = 0
  while (%m3u > 0) && (%pup < $numtok(%rme.fle,32)) {
    inc %pup
    var %match.file = * $+ $gettok(%rme.fle,%pup,32) $+ * 
    if (%match.file !iswm $line(@filelist,%m3u)) {
      dline @filelist %m3u
      did -d player 8 %m3u 
      dec %m3u
    }
    else { dec %m3u }
  }
}  


but it still doesn't work confused

#12461 22/02/03 06:45 PM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
var %m3u = $line(@filelist,N) <- should be -> var %m3u = $line(@filelist,0)


Code:
alias RemoveM3u {
  var %i = 1
  while $line(@filelist,%i) {
    if $regex($ifmatch,/\.mp3$|\.ogg$/) { dline @filelist %i | did -d player 8 %i }
    else inc %i
  }
}

#12462 22/02/03 06:54 PM
Joined: Feb 2003
Posts: 27
L
Lowest Offline OP
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Feb 2003
Posts: 27
but N and 0 do the same thing right?

anyway it never worked frown

Edit: oh it kinda worked but it removed the files that I wanted to keep and kept the file i wanted to get rid of

Last edited by Lowest; 22/02/03 06:59 PM.
#12463 22/02/03 07:09 PM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Hm, you're right about the N returning the total lines.
And yes, sorry I missed the !iswm, sorry blush
Code:
alias RemoveM3u {
  var %i = 1
  while $line(@filelist,%i) {
    if !$regex($ifmatch,/\.mp3$|\.ogg$/) { dline @filelist %i | did -d player 8 %i }
    else inc %i
  }
}


#12464 22/02/03 07:17 PM
Joined: Feb 2003
Posts: 27
L
Lowest Offline OP
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Feb 2003
Posts: 27
thanks I've been trying to get this to work for days grin


Link Copied to Clipboard