Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ colour match
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Zhou_shu
(3 posts) Bio
|
| Date
| Sat 06 Sep 2003 03:14 AM (UTC) |
| 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 (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Sat 06 Sep 2003 07:05 AM (UTC) |
| 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 (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #2 on Sat 06 Sep 2003 07:06 AM (UTC) |
| 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) |
| 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.
14,944 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top