mIRC Home    About    Download    Register    News    Help

Print Thread
#207187 09/12/08 02:36 PM
Joined: Aug 2004
Posts: 423
C
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


Joined: Jan 2003
Posts: 2,523
Q
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
Joined: Aug 2004
Posts: 423
C
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.
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

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.



Link Copied to Clipboard