mIRC Home    About    Download    Register    News    Help

Print Thread
#175106 17/04/07 06:09 PM
Joined: Oct 2006
Posts: 20
G
Ameglian cow
OP Offline
Ameglian cow
G
Joined: Oct 2006
Posts: 20
hey all,

i kinda stumped on something, i'm trying to get a query option in this script working. its for a custom window /w list box what it does is list ops in da listbox. but it only looks at the first name in the list no matter which name you click on.. was hoping someone could shed some light on this .. this is what i'm doing:
Code:
Query $remove($1,@):/query $remove($line(@Chat.Win,$sline(@Chat.Win,$1),1),@)
 

thats my menu code

Code:
alias Chat.Refresh {
  var %ptr = 1- $+ $line(%Chat.WinName,0,1)
  dline -l %Chat.WinName %ptr
  %ptr = $nick(%Chat.Chan,0,o)
  while (%ptr) {
    var %opnick = $remove($nick(%Chat.Chan,%ptr,o).pnick,+)
    if ($istok(%Chat.Bots,%opnick,44) != $true) { aline -l %Chat.WinName %opnick }
    dec %ptr
  }
}
 

and thats the alias that rereshes the window nlist... as you can see i'm using the pnick switch to show prefixes, could that be why it's not working??

thanks in advance


Joined: Apr 2004
Posts: 218
P
Fjord artisan
Offline
Fjord artisan
P
Joined: Apr 2004
Posts: 218
From what I understand I believe this might help you:

Query $remove($$1,@) :{ query $remove($line(@Chat.Win,$sline(@Chat.Win,$$1),1),@) }

(Changed the $1's to $$1's. Its untested but I believe this is the correct way.)


Live to Dream & Dream for Life
Joined: Oct 2006
Posts: 20
G
Ameglian cow
OP Offline
Ameglian cow
G
Joined: Oct 2006
Posts: 20
still not working... confused

Joined: Oct 2006
Posts: 20
G
Ameglian cow
OP Offline
Ameglian cow
G
Joined: Oct 2006
Posts: 20
i think it's because of my use of the .pnick property... to get the prefixes..?? is there another way to do this? ....anyone?

Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031
The $$1 in your $sline should just be 1

~ Edit ~

Also, I'm sure there's some regex way of removing all available prefixes...

Code:
alias npnick {
  while ($left($1,1) isin $prefix) tokenize 32 $right($1,-1)
  return $1
}


Whith this identifier you could use this...

Query $npnick($sline(@Chat.Win,1)) :query $npnick($sline(@Chat.Win,1))

Last edited by RoCk; 18/04/07 01:50 PM.
RoCk #175162 18/04/07 02:09 PM
Joined: Oct 2006
Posts: 20
G
Ameglian cow
OP Offline
Ameglian cow
G
Joined: Oct 2006
Posts: 20
THE ROCK RULES!!!!!! that did the trick ... thanks cool


Link Copied to Clipboard