mIRC Home    About    Download    Register    News    Help

Print Thread
#175106 17/04/07 06:09 PM
G
ghettowboy
ghettowboy
G
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


#175118 18/04/07 01:12 AM
Joined: Apr 2004
Posts: 217
P
Fjord artisan
Offline
Fjord artisan
P
Joined: Apr 2004
Posts: 217
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.)

G
ghettowboy
ghettowboy
G
still not working... confused

#175159 18/04/07 12:43 PM
G
ghettowboy
ghettowboy
G
i think it's because of my use of the .pnick property... to get the prefixes..?? is there another way to do this? ....anyone?

#175161 18/04/07 01:13 PM
Joined: Dec 2002
Posts: 1,995
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 1,995
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
G
ghettowboy
ghettowboy
G
THE ROCK RULES!!!!!! that did the trick ... thanks cool


Link Copied to Clipboard