mIRC Home    About    Download    Register    News    Help

Print Thread
vars and custom windows.. #207187 09/12/08 02:36 PM
Joined: Aug 2004
Posts: 423
C
clutz1572 Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
hey guys...

i have a question about more or less dupe checking contents in a custom window...

i'm not sure how to go about this.. i have a series of vars that get added/stored to a hidden custom window, in this manor:


they get tokenized $1 $2 $3 $4
checked if the vars are true :
if (%blah) && (%blah2) && (%blah3) && (%blah4) return

then gets added through alias that also does some other stuff:
$ntfy(%blah,%blah2,%blah3,%blah4)

custom alias $ntfy:
%var %tab = $chr(9), %c = @_my_window

aline %c $1 %tab $+($2,) %tab $3 %tab $4


this this info above is what goes into the hidden custom window .. then all else continues on...

what i'd like to do here is to make a check to see if there are dupe lines being added.. if so halt it, if not add it.. i'd like to be able to check vars blah3 and blah4 against items $3 and $4 that have been previously added to the hidden custom window...

would someone be able to point me in the right direction at least, if not show how to do this.. ??

i hope i'm not being to confusing.... and thanks in advance laugh


Re: vars and custom windows.. [Re: clutz1572] #207188 09/12/08 02:40 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Use /aline -n to add lines.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: vars and custom windows.. [Re: qwerty] #207189 09/12/08 03:05 PM
Joined: Aug 2004
Posts: 423
C
clutz1572 Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
doh!

yeah huh..... lol thanks qwerty.. i feel sheepish now, since i didn't look to see if aline had a switch for that.. I should've known.... oh well.. laugh

Last edited by clutz1572; 09/12/08 03:06 PM.
Re: vars and custom windows.. [Re: clutz1572] #207190 09/12/08 03:13 PM
Joined: Dec 2002
Posts: 2,021
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,021

To check if a new line was actually added or not you could...

custom alias $ntfy:
var %tab = $chr(9), %c = @_my_window,%l = $line(%c,0)
aline -n %c $1 %tab $+($2,) %tab $3 %tab $4
if ($line(%c,0) > %l) echo -a A new line was added.
else echo -a Line already exists.