[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  colour match

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

colour match

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Zhou_shu   (3 posts)  [Biography] 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.

[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] 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
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] 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
[Go to top] top

Posted by Poromenos   Greece  (1,037 posts)  [Biography] 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!
[Go to top] 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]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]