mIRC Homepage
Posted By: raZOR nickh highlight+info window - 13/02/06 06:41 PM
for nick highlight i have this:

on *:text:$($+(*,$gettok($replace($me,|,?,_,?,~,?,[,?,],?,$({,),?,$(},),?),1-,63),*)):#:{ do stuff }

;(c) DaveC

but i wanna know what should it be done that for example
when i am away or idle and someone mentiones me
that @window opens and only shows those lines when i was mentioned (so same as in chat channel but only lines where i was mentioned)

so it works like this:


(19:29) <some_user> Hey (me) you here?

time passes by...

(21:40) <some_user> is (me) still away ?

etc...

hope you understood =)
Posted By: genius_at_work Re: nickh highlight+info window - 14/02/06 01:45 AM
Try this:
Code:
on *:text:$($+(*,$gettok($replace($me,|,?,_,?,~,?,[,?,],?,$({,),?,$(},),?),1-,63),*)):#:{ 
  if (!$window(@awaylog)) window @awaylog
  aline -hpi @awaylog $timestamp $nick $+ @ $+ $chan $1-
}


(untested)

-genius_at_work
Posted By: raZOR Re: nickh highlight+info window - 14/02/06 02:10 AM
whoa it works perfect !

i just want to ask you what does this line do?
if (!$window(@awaylog)) window @awaylog

it checks if @awaylog isn't active or opened or???
Posted By: genius_at_work Re: nickh highlight+info window - 14/02/06 02:20 AM
That line checks if the @awaylog window is already opened, and if it isn't, then it opens the window.

-genius_at_work
Posted By: raZOR Re: nickh highlight+info window - 14/02/06 02:26 AM
okay

thanks very much
i apreciate it =)
Posted By: DaveC Re: nickh highlight+info window - 14/02/06 03:22 AM
you can actually just create the window no action occurs if it exists already, its faster than checking if it exists and then creating if it doesnt.

--edit--
Just noticed this is apparently my copyrighted code, omg omg ill sue ill sue, oh wait if sue the same as want a chocalote fish?
Posted By: raZOR Re: nickh highlight+info window - 14/02/06 03:27 AM
ya i give credits to all who gimme and/or modify code
so noone can say its a ripoff if i post it here (or somewhere else) laugh:D:D:D
Posted By: genius_at_work Re: nickh highlight+info window - 14/02/06 03:28 AM
Yeah, I put the check in out of habit. I usually have some switches in the /window command that I only want to happen the first time, such as bringing the window to the front the first time something happens, and then leaving it minimized if the thing continues happening.

-genius_at_work
Posted By: raZOR Re: nickh highlight+info window - 14/02/06 03:31 AM
so i just remove this: if (!$window(@Highlight))
right ?
Posted By: DaveC Re: nickh highlight+info window - 14/02/06 03:44 AM
Quote:
I usually have some switches in the /window command that I only want to happen the first time, such as bringing the window to the front the first time something happens, and then leaving it minimized if the thing continues happening.


Oh yeah, i know how that gets, wasnt sure if u knew or not so just mentioned it, np.
© mIRC Discussion Forums