Highlight Trigger code
Posted: Sun Sep 06, 2009 2:55 am
What code would correspond to the behavior of the color trigger?
I want to have it in oder to change the colors by script.
I tried this:
selectString( matches[2], 1 )
fg( "red" )
deselect()
For a pattern like this:
^I have (\w+) in my pocket$
that would work...
But with this:
^I have (\w+) and (\w+) in my pocket$
it would only color on occurrence.
> I could change the number to 2 [selectString( matches[2], 2 )]
but what if I have 2 patterns....
^I have (\w+) in my pocket$
^I have (\w+) and (\w+) in my pocket$
> that works with the color trigger!
but I can't find the code that does the same thing.
I want to have it in oder to change the colors by script.
I tried this:
selectString( matches[2], 1 )
fg( "red" )
deselect()
For a pattern like this:
^I have (\w+) in my pocket$
that would work...
But with this:
^I have (\w+) and (\w+) in my pocket$
it would only color on occurrence.
> I could change the number to 2 [selectString( matches[2], 2 )]
but what if I have 2 patterns....
^I have (\w+) in my pocket$
^I have (\w+) and (\w+) in my pocket$
> that works with the color trigger!
but I can't find the code that does the same thing.