What I'm trying to do is to make an on TEXT event trigger on a set value that may appear anywhere in a sentence. I have no real idea about the syntax though. I assumed the syntax would be the same as for identifiers. So what I need is to match like this
Code:
on *:TEXT:*%bword*:#chan:{
I've tried translating from identifiers $(* $bword *) to (ie %(* %bword *)) but can't get that to work. All and any help is appreciated!
I've tried translating from identifiers $(* $bword *) to (ie %(* %bword *)) but can't get that to work. All and any help is appreciated!
Your syntax is incorrect in both examples you show. You used '$bword' and '%( )'. It is '%bword' and '$( )'.
$(* %bword *)
Originally Posted By: "Help File"
$(...)
This identifier can only be used in the text match section of an event definition. It allows you to create a match parameter dynamically. You can use $1- to reference the incoming line.
Yes I know I used the wrong syntax there. I as just giving an example. What I do currently use is $(* $me *) which is perfectly fine. I'll try with the %s again now. Thanks both of you.
I tend to use if statements as well, but the nice thing about this style is you can have more than one text event in a file instead of one that handles a bunch of if statements.
anything in $() is always evaluated though even if it doesn't match, which is quite obvious. So depending on what it holds it might not always be very efficient.
You can always use more then one on text in a file as long as the match text doesn't cancel others out.