|
M_Hennecke Newbie
Joined: 04 Feb 2004 Posts: 5 Location: Germany
|
Posted: Wed Feb 04, 2004 9:38 pm
Ansi Codes in Variable |
Hi,
I want to capture the multiline channels of my mud to a seperate window. I've read some articles about it in this forum. The first standard solution with an initial trigger that enables a class and a T- in this class that disables this class after capturing the end of a channel message doesn't work.
Each channel has a different color. I tried to capture the ANSI code and store it in a Variable. I changed the * trigger from the solution in the "finished scripts forum" to @AnsiCodeChar and added to the initial trigger, that enables the "capture" class, a second state. It's a wait (500ms) trigger without pattern.
#TRIGGER {^&AnsiChanCode~[%w~]} {#class cap 1}
#COND {} {#class cap 0} {Wait|Param=500}
in class cap
#TRIGGER {@AnsiChanCode} {#CAPTURE Channels #GAG}
channels start with e.g.: [L] bla or [laber] bla
my problem is the variable that should contain the ansicode. but it doesn't. Ansi Trigger is selected for sure.
Marius |
|
|
|
M_Hennecke Newbie
Joined: 04 Feb 2004 Posts: 5 Location: Germany
|
Posted: Tue Feb 10, 2004 12:52 pm |
No one an idea!?[V]
|
|
|
|
Rorso Wizard
Joined: 14 Oct 2000 Posts: 1368
|
Posted: Tue Feb 10, 2004 12:58 pm |
quote: Originally posted by M_Hennecke
No one an idea!?[V]
You need to write down an example on how the channels look. Like how does it look when it is multiline? What comes after? Ideally such information includes a bit of text surrounding the channel lines.
This is the most likely reason no one have replied to your question. Good luck |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Feb 10, 2004 4:40 pm |
ANSI control codes frequently contain special characters which aren't captured by the * wildcard, which is the default wildcard for &varname.
In addition, if an ANSI control code sequence contains more than one attribute, which is frequently the case, the ANSI sequence from the MUD won't necessarily be in the same order as the ANSI sequence used by zMUD, and it's the ANSI sequence used by zMUD which you need to match.
In order to use color matching, you'll need a separate trigger for each channel with the appropriate pattern for that channel's color.
I'm a little surprised by your first comment. The #T- method always works if you are able to find an accurate method of identifying the end of the channel line and I've always been able to do so. |
|
|
|
M_Hennecke Newbie
Joined: 04 Feb 2004 Posts: 5 Location: Germany
|
Posted: Tue Feb 10, 2004 5:10 pm |
To the "T- doesn't work": It's not possible to capture the end of a channel message. People can wrote what they want and the mud just send the message to everyone without manipulating it at the end.
example:
"[L]: Hammerhead labert lauthals: grats"
Multiline:
"[L]: Hammerhead labert lauthals: blablabla................whatever"
" and another line"
Lightbulb: creation of seperate triggers for each channel is the worst case solution but perhaps the only one.
capturing ANSI sequences from ZMUD: How could I capture them!? Just copy the line from zmud window to an ANSI trigger!?
Thanks
Marius |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Feb 11, 2004 1:06 am |
Ah, then multilines always begin and end with "? That should be pretty easy to do a trigger for.
Highlight the text in the main window. Paste it to the pattern box in the editor with CRTL V. You must already have the ANSI option selected for this to work. |
|
|
|
|
|