Reply to this subject
Start a new subject
 
Refresh page
| Posted by |
Zhou_shu
(3 posts) bio
|
| Date |
Sat 06 Sep 2003 03:14 AM (UTC) [ quote
] |
| Message |
I want to match a red word (other words are not red in this line), but i do not know what the red word is.
I made a trigger like this:
<trigger
enabled="y"
keep_evaluating="y"
match="[a-zA-Z0-9 ]+"
match_inverse="y"
match_italic="y"
match_text_colour="y"
regexp="y"
sequence="148"
text_colour="9"
other_text_colour="black"
other_back_colour="black"
>
</trigger>
If the red word is the start word of the line, the trigger can match the line. If not, it does not work.
| top |
|
| Posted by |
Nick Gammon
Australia (18,770 posts) bio
Forum Administrator |
| Date |
Reply #1 on Sat 06 Sep 2003 07:05 AM (UTC) [ quote
] |
| Message |
| I think what is happening here is that "keep evaluating" means "keep evaluating after a match" however your trigger will match a word, it checks the colour, the colour is not red, thus it is not considered a match. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
| Posted by |
Nick Gammon
Australia (18,770 posts) bio
Forum Administrator |
| Date |
Reply #2 on Sat 06 Sep 2003 07:06 AM (UTC) [ quote
] |
| Message |
| What you could do is use a script to GetLineInfo and then GetStyleInfo for that line, work your way through the line (getting the colours for each style run). When you find a style run in red, then you have your red word. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
| Posted by |
Poromenos
Greece (1,037 posts) bio
|
| Date |
Reply #3 on Sat 06 Sep 2003 09:34 AM (UTC) [ quote
] |
| Message |
| Or check "repeat on same line", under the "regular expression" checkbox. |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
1,386 views.
Reply to this subject
Start a new subject
 
Refresh page
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )