Can a trigger be set to go off on a line that is a specific color? For instance when I look at a spell list, spells I am currently affected by are listed in bright green, and all others are dark green.
I looked around a bit and didn't see any documentation on this. If it's not possible via trigs, is it possible via script?
Triggers can certainly match colours - see the "Match" line after the "trigger" line when you edit one.
However the colour is the colour of the first matching character, which may not be what you want.
If it is, fine, otherwise, make a trigger that matches the line in general, and then use GetLineInfo and GetStyleInfo to "walk" through the styles in the line and see what colour the word in question is.
Yeah, this line has several color codes, the first of which is always the same:
Active spell - @wSpell: @GInvis @wAffects: blah blah
Inactive spell - @wSpell: @gInvis @wAffects: blah blah
I'll play around with GetLineInfo and GetStyleInfo and see if I can get it to do what I want. Thanks!
Use the Display menu -> Text Attributes -> Line info to see how many styles there are, and what they contain. In your example the spell name will probably be style 2 and contain (say) "Invis". Just use GetStyleInfo to find what *colour* that style is.