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

Gammon Forum

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

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Getting Started
. . -> [Subject]  How to highlight words
Home  |  Users  |  Search  |  FAQ
Register forum user name
Forgotten password?

How to highlight words

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

Posted by Nick Gammon   Australia  (21,674 posts)  [Biography] bio   Forum Administrator
Date Sun 05 Aug 2007 04:36 AM (UTC)

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
[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.


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

Go to topic:           Search the forum

[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

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

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]