I've run into a bit of a problem, I need to create a trigger that matches on a specific color, however, the text in this particular color appears midway through a line. For instance the line:
clouds. Outside the Cave.
has two colors. "Clouds. " is in cyan on black while "outside the cave" is yellow on black. I want the trigger to catch any text that's in yellow on black into a wildcard, but I've run into a problem, if the first character of the line isn't in yellow on black, it won't fire the trigger. Is there any way to work around this?
no, this was just an example. The text that appears in cyan and the text that appears in gold will change depending on circumstances. So what I need is a trigger that ignores the cyan part of the line and captures the part in gold.
If the trigger is a regular expression, it can match a single word (or group of words), which you can see if you colour it a different colour.
Then once matched the colour evaluation is done on the first letter of the matching text. So, in your example, if you matched "Outside the Cave" (regular expression) and then matched yellow on black, it would match a line with "Outside the Cave" in yellow on black.
However if there a pre-conditions, like the line must start with something else, then it becomes harder, although you might achieve that with a second trigger that discards lines that do *not* have that precondition, and use sequence numbers to control evaluation order.
See if that works, otherwise there is another approach you could use. :)
Sorry for the long delay in the reply. This strategy won't work, since what's written in cyan and what's written in yellow on black changes unpredictably. It won't always be "Outside the Cave." In fact, it might never be that text. I know only that some word (or group of words) in the line will be written in yellow on black. Sometimes these will appear at the beginning of the line, other times, they will appear after other text written in any colour other than yellow on black.
So what I need is a trigger that captures *only* the yellow on black text, whatever it may be, wherever it may be on the line.
Yes it clarifies it, but trigger matching currently works the other way. That is, it matches the text you supply and then confirms it is the colour you want (if any).
You want it to scan for colours first.
It can be done, write a script that does GetLineInfo, and GetStyleInfo to iterate through the style runs for the line (it would help reduce computation if you could at least partly identify the line, but if not you could do it for all lines).
You could fairly quickly find the colour sequences you want, and then start evaluating the text (the style info has the text as well as the colours).