|
FiendishX Wanderer
Joined: 19 Nov 2005 Posts: 53
|
Posted: Sat Jul 12, 2008 8:59 pm
detect zmud color settings |
Is there a way to detect (and change) what color settings zmud is using? (vt100, ansi, windows, user defined)
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Jul 12, 2008 9:24 pm |
From the server, or yourself? All the options are configurable in the settings - VT100 and ANSI emulation are both toggleable there. The default is ANSI emulation, but the user can change which colours are associated with which ANSI codes.
|
|
|
|
FiendishX Wanderer
Joined: 19 Nov 2005 Posts: 53
|
Posted: Sat Jul 12, 2008 9:52 pm |
From a script.
The default seems to be VT100, not ANSI.
If it were ANSI I probably wouldn't be asking this question. The reason for asking is that I have a script that works fine when zmud is set to ANSI but doesn't work when set to VT100 (yeah, I know. I'm working on making it not matter.). And I just thought that it'd be really nice to be able to determine what the client settings are. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Jul 12, 2008 10:30 pm |
...it shouldn't matter, so if you could show us the script that'd help.
Afaik there's no way to do this in zMUD, because zMUD doesn't have the %pref function. |
|
|
|
FiendishX Wanderer
Joined: 19 Nov 2005 Posts: 53
|
Posted: Sat Jul 12, 2008 10:41 pm |
I know it shouldn't matter. But the ansi codes that I receive from the mud appear to be different depending on which scheme I have set.
For instance...
an ansi trigger with the pattern ^(~|*~|)$ will pick up certain colored lines received while ANSI is set, but not while VT100 is set.
To catch them with VT100 you have to remove the ^ or add in %e[37m because the line actually begins with that code in VT100 mode but maybe it gets ignored in ANSI mode.
That is trivial to change in the script so that it works both ways, but it is an example of where the different schemes make a difference.
There is another issue somewhere that's causing another problem. Once I figure out what the code is that's causing the problem, I'll post again in the thread to show you. |
|
|
|
FiendishX Wanderer
Joined: 19 Nov 2005 Posts: 53
|
Posted: Sun Jul 13, 2008 12:46 am |
Well I've managed to fix everything and make it work in VT100. The problems encountered were ultimately related to the ANSI default color being white and not accounting for extra space taken up by the necessary additional white color codes on certain lines. Anyway, I guess it's not important.
|
|
|
|
|
|