|
Irer Beginner
Joined: 08 Feb 2007 Posts: 12
|
Posted: Thu Feb 08, 2007 3:36 am
Color trigger question |
zMUD 7.04
Is there a way to get zMUD to match to the color of the pattern itself, instead of just the line? My MUD switches colors mid-line, and from what I can tell, the "line color" option for triggers only recognizes the color at the beginning of the line. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Feb 08, 2007 4:19 am |
Yep. Copy the MUD text you want to capture the colour codes of to the clipboard from the buffer, open the editor and check the ANSI trigger option, then paste the text. The colour codes will appear in the trigger.
EDIT: Though I really would recommend upgrading to 7.21, you know. Why haven't you? |
|
|
|
Irer Beginner
Joined: 08 Feb 2007 Posts: 12
|
Posted: Thu Feb 08, 2007 6:37 am |
I think I stated it wrong. What I get is a block of text, and the color changes within a line. I'd like to trigger off a particular color, but it doesn't start at the beginning of the line, and the position varies within the line. Sometimes the color does start the line, but usually it doesn't. Think...
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT. *color change* MORE TEXT.
I'm looking to only trigger on the stuff that comes after said color change. Neither the before or after text remains constant.
And I stick to 7.04 for convenience. I'm a creature of habit. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Feb 08, 2007 10:10 am |
You're going to have to describe more than that - what parts of that text are you looking to trigger on? Is it the same block of text every time with a colour change somewhere in it, or is it just random text with a colour change? What parts of the text do you want to capture?
Regardless, the ANSI trigger option is what you want, it's just constructing a regex to do whatever you want it to do. |
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Thu Feb 08, 2007 5:26 pm |
Fang I am afraid I need more info myself on your suggestion. I've seen you give this advice to a few people but I find myself unable to follow it.
If I.
1 Highlight colored text from the mud.
2 Open the trigger editor and set a trigger to ansi type
3 Paste the text into the trigger pattern
The trigger NEVER has the color codes in it and it does not trigger correctly either.
I believe what this person wants is to capture something like, blah blah %e[2(*)%e[5 blah blah, with their trigger. Usually people do this to set a variable that says Other people in the room or Objects in the room.
My standard answer for those folks is to turn on ansi logging and capture a block of text then take the codes from there. Your solution, if I could get it to work, would be a better one. |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Feb 08, 2007 5:33 pm |
I've never actually used this myself, but I've been told it works. I was going to test it when I made that reply just to make sure, but my firewall is bugging out and won't let zMUD connect to anything. Please forgive me if it's not working.
|
|
|
|
mikeC130 Apprentice
Joined: 03 Jul 2006 Posts: 110
|
Posted: Fri Feb 09, 2007 5:15 am |
Arminas wrote: |
My standard answer for those folks is to turn on ansi logging and capture a block of text then take the codes from there. Your solution, if I could get it to work, would be a better one. |
Please pardon my display of ignorance, but how do you enable ansi logging?
Mike |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Fri Feb 09, 2007 6:14 am |
It's in the preferences - General->Logging->Log ANSI colour.
|
|
|
|
|
|