Register forum user name Search FAQ

Gammon Forum

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 ➜ Getting Started ➜ How to highlight words

How to highlight words

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Sun 05 Aug 2007 04:36 AM (UTC)
Message

There are times when you might want to automatically highlight words that arrive, for example, the names of your friends. An easy way of doing this is to use the "Highlight Word" feature. Let's suppose you see the name of your friend "Etilgrin" on the screen:

Name of friend

Now to highlight it, we double-click the word "Etilgrin" (to select it), and then choose Highlight Word from the Display menu:

Display menu

This opens the "Highlight word or phrase" dialog box, with your selected word inserted already, and its current colours shown. If your friend's name was not on the screen already, this would be a good time to type it in. Then you can click on the two colour swatches to change the foreground and background colour that this word will appear in, in future:

Highlight word dialog

By clicking on the colour swatch you open the MUSHclient "colour picker", which gives you lots of options for choosing colours. You can click on the big swatch to open the Windows colour picker, choose one from the list of names on the left, or drag the colour sliders around to modify the colour manually:

Colour picker

When you have finished, you might see something like this:

Modified colours

Click OK to save the changes, and then "look" again to see the name of your friend in its new colours:

Name highlighted

What this process has actually done is created a "trigger" - something that matches incoming text. You can press Alt+Enter to open the world configuration dialog, and then see the trigger in the triggers list:

Triggers list

This screen shows the new trigger. It has created a regular expression, as that can be used to colour part of a line. The word you chose is in the "Trigger" box, with \b at each side. The \b tells MUSHclient to only match on a whole word. It has also checked "repeat on same line", in case the same word appears more than once on a line:

Highlight word trigger


- Nick Gammon

www.gammon.com.au, www.mushclient.com
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,560 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.