I'm trying to remember how to match on (part) of a triggers color. There's a line like "The <noun> of the wand glows." where I need to match if the word color is red. My regex is more or less "The * of the wand glows".
I see getstyle, but I don't know how to have it match arg1 (%1) for this trigger.
It is more or less covered here:
In essence, getstyle gives you the colour if you know the column, and in your case you do (it's column 5).
Yeah I read that post and it only provides examples of functions, unless I'm missing something. I guess I'm wondering what the first arg of getstyles would be then.
The style runs as supplied to your trigger.
Not sure I follow. You mean I need to change my trigger to match the color instead of looking for that in the Send?
Can you post your trigger please?
See:
http://www.gammon.com.au/scripts/doc.php?dialog=IDD_EDIT_TRIGGER
In particular:
If you use "send to script (after omit)" then the style runs are also available from the global variable: TriggerStyleRuns.
So, either use a script function, in which case the styles are the 4th argument, or change it to "send to script (after omit)" and then use:
style = GetStyle (TriggerStyleRuns, 10)
Then check style.textcolour.