|
Vunutus Newbie
Joined: 18 Jul 2007 Posts: 6
|
Posted: Sun May 04, 2008 5:09 am
Is it possible to get the color of a line? |
I want to make a script that outputs every received line into a log file WITH its color tag attached, but I can't find a way to tell what color something is. Is this possible?
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sun May 04, 2008 1:33 pm |
Go into the preferences, check the "ANSI Log" or "Log ANSI colour" checkbox or whatever. Job done.
If your MUD's using MXP colour, there's not a lot you can do - CMUD will be able to do it, but zMUD won't log MXP without some pretty complex scripting, and since it's firing on every line, it'll slow you down. |
|
|
|
Vunutus Newbie
Joined: 18 Jul 2007 Posts: 6
|
Posted: Sun May 04, 2008 7:43 pm |
Fang Xianfu wrote: |
Go into the preferences, check the "ANSI Log" or "Log ANSI colour" checkbox or whatever. Job done.
If your MUD's using MXP colour, there's not a lot you can do - CMUD will be able to do it, but zMUD won't log MXP without some pretty complex scripting, and since it's firing on every line, it'll slow you down. |
That gets about half the job done, but I also need to have a timestamp for what I'm doing. In addition, several other script ideas I have would be possible if I knew how to determine a character's color. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sun May 04, 2008 8:49 pm |
You probably don't need to do anything that way; there's probably an alternative. If you simply must have it that way, though, you can use an ansi trigger and have the script remember the latest colour code as you move through the string doing whatever it is you're doing.
Timestamps are a bit harder - in CMUD, all you need to do is check a box. In zMUD you could try
#trig {^} {#sub %time(hh:nn:ss.zzz)}
or something. |
|
|
|
|
|