mIRC Home    About    Download    Register    News    Help

Topic Options
#220337 - 11/04/10 02:03 PM Could somebody help me with filtering script
Semel Offline
Bowl of petunias

Registered: 11/04/10
Posts: 2
Good day.

Well, i guess it would be filtering.

What i need is a simple script that could "catch" messages with say "XXX" + "YYY" in their bodies and then post them in a new specified window while making a pop up message in the tray when these messages are "catched".

Im a complete noob at this so any help would be greatly appreciated.
Or at least some hints.
Thank you in advance.

Top
#220339 - 11/04/10 02:24 PM Re: Could somebody help me with filtering script [Re: Semel]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: MA, USA
Something like this:

Code:
on *:text:*:#: {
  if (XXX isin $1- && YYY isin $1-) {
    echo @somewindow $1-
    noop $tip(Caught,Message from $nick,$iif($1 == $null,<none>,$1-),$null,$readini($mircini,files,trayicon),1,window -a @somewindow,$null)
  }
}


Replace XXX, YYY, @somewindow (both locations), and you can also change the wording "Caught" and "Message from $nick" if you want.
_________________________
Invision Support
#Invision on irc.irchighway.net

Top
#220345 - 11/04/10 03:26 PM Re: Could somebody help me with filtering script [Re: Riamus2]
Semel Offline
Bowl of petunias

Registered: 11/04/10
Posts: 2
Thanx, ill give it a try.
PS It works like a charm. smile

PS Hmm what shoudl i put instead of @somewindow ?
If i leave it then all messenges go to servers window. I tried changing to different names - same effect/ Guess im doing something stupid=)

Nevermind=) Ive found it.Stupid error. My bad. Thank you again.


Edited by Semel (11/04/10 04:10 PM)

Top
#220349 - 11/04/10 05:14 PM Re: Could somebody help me with filtering script [Re: Semel]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: MA, USA
You put whatever window you want it to appear in. #channelname, some custom @window, etc. You didn't say where you wanted it to appear.
_________________________
Invision Support
#Invision on irc.irchighway.net

Top
#220350 - 11/04/10 05:20 PM Re: Could somebody help me with filtering script [Re: Riamus2]
DJ_Sol Offline
Hoopy frood

Registered: 04/01/07
Posts: 1156
Loc: Seattle
Whenever sending something to a custom window, I like to make sure the window is open first.

if (!$window(@somewindow)) window -e @somewindow

Top
#220351 - 11/04/10 05:30 PM Re: Could somebody help me with filtering script [Re: DJ_Sol]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: MA, USA
Yes, but I have no idea if it's a custom window or not. It wasn't specified. Adding something like that if the OP instead wants it to echo to status or active or a channel just confuses the issue. I suppose I could have added a note at the end saying that, tho.
_________________________
Invision Support
#Invision on irc.irchighway.net

Top