|
nostra Wanderer
Joined: 23 May 2001 Posts: 68 Location: Sweden
|
Posted: Fri Jun 06, 2003 3:28 pm
Implementing a nested color-trigger |
I'm trying to make a trigger that is partly sensitive to the color of the zmud text.
ZMUD OUTPUT
[94 :241 F Archon Dungn ] Natsuki [=Va|ha||a=][GUIDE]
PATTERN
^~[*~]%s(%w) "IF next bracket is blue, store the content in a second variable" #IF blue ~[(*)~]
VALUE
#ADDKEY record_variable %1 %2
The reason I have to make it color-sensitive is that the output from Zmud could be like this:
[94 :241 F Archon Dungn ] Natsuki [GUIDE]
And a common trigger would then store GUIDE as the second variable in my record_variable list.
I've looked at the MXP triggers but they don't seem to fit this case...
Regards,
Mikael |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Fri Jun 06, 2003 5:34 pm |
If you include the [GUIDE] part in the pattern of the trigger, then it will not fire with the second case:
^~[*~]%s(%w) ~[(*)~]~[GUIDE~]
Also, you could have it check that it is not GUIDE before saving it:
#IF (%2 <> "GUIDE") {#ADDKEY record_variable %1 %2}
Kjata |
|
|
|
nostra Wanderer
Joined: 23 May 2001 Posts: 68 Location: Sweden
|
Posted: Fri Jun 06, 2003 5:51 pm |
Well the GUIDE was just an example. It could be any kind of name within the brackets.
So, I have to make sure that IF I'm to store the content within a bracket it has to be conditional that the first bracket is blue (see above); else I should just ignore it.
Is it possible to have a color-sensitive trigger? |
|
|
|
|
|