mIRC Home    About    Download    Register    News    Help

Print Thread
#26781 29/05/03 02:54 AM
Joined: Dec 2002
Posts: 417
O
Othello Offline OP
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Dec 2002
Posts: 417
This script will not clear the whole list
It onlyt clears a 3rd of the list any suggestions?


Reset: {
var %cnt = 1
while ( $cnick(%cnt) != $null ) {
//.cnick -r $cnick(%cnt,a)
echo -s reset $cnick(%cnt,a)
inc %cnt 1
}
}






Intelligence: It's better to ask a stupid question, then to prove it by not asking....
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Try this one, only /inc %cnt if the entry was removed.
Code:
Reset:{
  var %cnt = 1
  while ( $cnick(%cnt) != $null ) {
    cnick -r $cnick(%cnt,a)
    else inc %cnt
  }
}

Imagine 3 lines in a text file,
1 first line
2 second
3 third
If you remove line1, the second line becomes line1,
1 second
2 third
so you would still remove line1 and not lline2.
1 third
now we are stil left with line1.
Hope that makes some sense to you. laugh

Joined: Dec 2002
Posts: 29
R
Ameglian cow
Offline
Ameglian cow
R
Joined: Dec 2002
Posts: 29
$cnick(0) will give you total entrys in mIRC color list so your code should look like this
alias reset {
var %x = 1
while (%x <= $cnick(0)) {
cnick -r $cnick(%x,a)
echo -s reset $cnick(%x,a)
inc %x
}
}
i think this is what you want.

Joined: Dec 2002
Posts: 417
O
Othello Offline OP
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Dec 2002
Posts: 417
Nemue It is in exactly what I was looking for. laugh

Rain I tried your ideal and this is the responce I recieved
* /cnick: insufficient parameters

I thought $cnick(0) would give me the total entrys in mIRC color list but it is not listed in the help file for $cnick. This was
the first thing I thought of. to see if there was a command that would give me the total number of nicks listed in Nick Color. I
I have even tried this //echo $cnick(0,a) But I get this error msg * /echo: insufficient parameters

Mirc stateds: $cnick(N/nick, M)

Returns Nth nick in nick color list, or if nick is specified returns Nth position of item in list that matches nick. If nick doesn't match any items, returns zero.

Properties: color, modes, levels, method, anymode, nomode, ignore, op, voice, protect, notify, idle

To get a nick's color, you can use $cnick(nick).color. If nick doesn't match any items in the list, returns 'Normal Text' color, or if M = 1, returns 'Listbox text" color. M is optional.




Intelligence: It's better to ask a stupid question, then to prove it by not asking....

Link Copied to Clipboard