mIRC Home    About    Download    Register    News    Help

Print Thread
#91035 19/07/04 09:59 PM
K
k1ll3rz
k1ll3rz
K
anyone know how to unload multiple files at once? i tried editing the alias to load multiple files but had no success. can sumone give me sum tips? thanx k1ll3rz

#91036 19/07/04 10:34 PM
Joined: Nov 2003
Posts: 2,321
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,321

  • alias unload2 {
    var %i = 1
    while ($script(%i)) {
    if ($istok($1-,$nopath($script(%i)),32)) { .unload -rs $script(%i) }
    else { inc %i }
    }
    }


/unload2 script1.mrc script2.txt etc.mrc

Edit: thanks qwerty smile

Last edited by tidy_trax; 19/07/04 11:07 PM.
#91037 19/07/04 10:38 PM
K
k1ll3rz
k1ll3rz
K
sorry to not mention this b4 but its for a dialog

#91038 19/07/04 10:41 PM
Joined: Dec 2002
Posts: 787
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 787

dialog umload {
title "Multiple unload dialog"
size -1 -1 123 68
option dbu
list 1, -1 0 124 57, size, extsel
button "UnLoad", 5, 93 58 30 10
}

on *:dialog:umload:sclick:5:{
var %i = $did(1,0).sel
while (%i) {
unload -rs $+(",$did(1,$did(1,%i).sel),")
dec %i
}
umloadrefresh $dname
}

on *:dialog:umload:init:*:{
umloadrefresh $dname
}

alias umloadrefresh {
did -r $1 1
var %i = $script(0)
while (%i) {
did -a $dname 1 $script(%i)
dec %i
}
}


Something like that should do the trick, uses the same dialog has tidy's other script.

Eamonn.

#91039 19/07/04 11:03 PM
Joined: Jan 2003
Posts: 2,125
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,125
This way you may miss certain scripts: when you /unload the 5th script, for example, the 6th becomes the 5th, but you still inc %i, so the new 5th script is skipped. Either stick an "else" in front of "inc" or use /dec.


Link Copied to Clipboard