I found some discussion on this topic on old posts, but I did not find a solution.
I want to trigger on the color of a whole line (or even just the first few chars).
The following trigger fires if ANY of the characters in the line are are the trigger color.
Any thoughts?
Help with color trigger
Re: Help with color trigger
Try something like this
Re: Help with color trigger
Hmm... not getting it to work. What should I put for the trigger to execute that code? I tried regex .*, but that didn't work.
Re: Help with color trigger
Still a color trigger for the color yellow, all the code is doing is checking the first few characters of the line to make sure those are in yellow in particular. And are you getting an error or something?
Re: Help with color trigger
ahhh, use 7 rather than 11
Re: Help with color trigger
Aha! Thank you! That explains it.
That last response prompted me to look here https://wiki.mudlet.org/w/Manual:UI_Functions, where I found this:
Very helpful! Especially since the number are differnt that in the coloro trigger:
That last response prompted me to look here https://wiki.mudlet.org/w/Manual:UI_Functions, where I found this:
Code: Select all
0 = default text color
1 = light black
2 = dark black
3 = light red
4 = dark red
5 = light green
6 = dark green
7 = light yellow
8 = dark yellow
9 = light blue
10 = dark blue
11 = light magenta
12 = dark magenta
13 = light cyan
14 = dark cyan
15 = light white
16 = dark white
Re: Help with color trigger
Yeah, I'm not sure why those numbers don't match up, but that's what caught me out.
Re: Help with color trigger
Me too. Now we know!
- SlySven
- Posts: 1023
- Joined: Mon Mar 04, 2013 3:40 pm
- Location: Deepest Wiltshire, UK
- Discord: SlySven#2703
Re: Help with color trigger
The colour selection dialogues for the colour triggers are referring to the ANSI 256-colour indexes (which are what the MUD Game Server will be sending) - but the list you are quoting came from a long standing function tempColorTrigger(...) which had that choice of numbers baked in back in the mists of time. Unfortunately they are NOT ANSI codes - so to get around that I added tempAnsiColorTrigger(...) which does use those numbers {as well as a couple of special case ones with negative values...!}Very helpful! Especially since the number are differnt that in the coloro trigger:
Re: Help with color trigger
Updated the docs so we find the alternative easier =)