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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Tips and tricks
. . -> [Subject]  New highlight words feature

New highlight words feature

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


Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Sun 26 Dec 2004 04:23 AM (UTC)
Message

In response to various requests for a way of highlighting words on a line, version 3.63 of MUSHclient now has a simple dialog box that lets you select some text in the output window and make a 'highlight this text' trigger. The dialog looks like this:

After using this you will find another trigger added to your trigger list, appropriately configured to highlight the selected text. If you haven't selected any text you can just type in any word(s) you wish to have highlighted.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Scypio   Poland  (50 posts)  [Biography] bio
Date Reply #1 on Sun 26 Dec 2004 10:57 AM (UTC)
Message
Ok, so I made a sample trigger using the new feature:
<triggers>
<trigger
custom_colour="1"
enabled="y"
keep_evaluating="y"
match="\binto\b"
regexp="y"
sequence="90"
other_text_colour="silver"
>
</trigger>
</triggers>
Shouldn't it have "Repeat on same line" checked by default?
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Reply #2 on Sun 26 Dec 2004 07:13 PM (UTC)
Message
Maybe you should have an option box (like match whole word only) for match case.

Since if youre just matching 'any word' (as opposed to say, a name) it might appear at the front of a sentence, and thus be capitalized.

Just seems like something that would be a common option to change.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Sun 26 Dec 2004 07:54 PM (UTC)
Message
Good idea. I thought of that yesterday, and added it in.

Also the idea of the context menu. And "repeat on same line", should have thought of that one. :)

Plus, I am making it default to "Other" colour, which make the colour boxes active by default. That would be best wouldn't it?

What do you think of a "random colour" button? Or is only one-click away on the colour picker good enough?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Reply #4 on Sun 26 Dec 2004 08:07 PM (UTC)
Message
Color picker should be fine; I don't think it’d be necessary to have a button for it.

And you could probably remove "no change" option, unless its a standard dropdown box.

And if "other color" is default, what is the default color for that? For me its my text color. But I don’t know if I just have that leftover or not. I should think that you'd want to default to something that would allow you to quickly click through the menu (which is what this is for). If 'other color' defaults to whatever you last picked, that could be good, since it'd let you color a lot of things the same (especially if its a non-standard color). Of course, if you are using that color so much, you'd probably have it as a custom color anyway.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

Posted by Shadowfyr   USA  (1,786 posts)  [Biography] bio
Date Reply #5 on Sun 26 Dec 2004 10:26 PM (UTC)
Message
Well, it might be most useful to have the 'other color' state initially reflect what the colors are in the original hilighted text. Also, in the same vain, an option for, "Match only if the same color as hilighted.', might be nice, since you may only want it to match in specific blocks of text that have a certain predetermined color. Selecting the option would show two more color selectors, which also default to the 'current' color of the word you hilighted. Then you could change it if, for example, the text you hilighted was in one color, but you wanted to look for it in a room, which is a different one. In this case though, the options need to allow for the existing ansi colors as named items you can pick in the color picker for it. While the custom colors are useful, they may not reflect the 'real' colors you are looking for from the mud.

And on a similar note. It might be useful to allow people to give a new color they create in the color picker a name, which would appear in the existing list of color names. That way you can more easilly select it later, instead of having to remember what settings you used or using an existing one. Of course you would only want them to override their own colors in those case, not the default set. If you want brown that looks brown, instead of reddish, you can just call it "TrueBrown" and pick that when you want it, rather than replacing the predefined ones, etc. However, I would suggest that this option be limited to the main world and not script accessible, since you don't want someone's plugin overriding the color table in the main world, or the even greater confusion of 5 plugins, all with a different definition for "My_Green", none of which match the "My_Green" from the main world file... lol
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #6 on Mon 27 Dec 2004 12:38 AM (UTC)
Message
Quote:

And you could probably remove "no change" option, unless its a standard dropdown box.


It is a standard box, and it was fiddly to remove.

Quote:

And if "other color" is default, what is the default color for that? For me its my text color. But I don’t know if I just have that leftover or not. I should think that you'd want to default to something that would allow you to quickly click through the menu (which is what this is for).


It was originally the default white on black text, whatever that is for you, however I have now modified the default to be whatever the colour of the selected text is, so if you want to change (say) green on black to green on white, then the original colours are already there for you.


Quote:

And on a similar note. It might be useful to allow people to give a new color they create in the color picker a name, which would appear in the existing list of color names.


Yes, but I don't want this dialog to get too complicated. The whole idea is it is replacing the more complex trigger dialog.

I think if you want to highlight a whole series of words the same way you should be considering a single trigger with "|" between the various parts.

You can currently copy and paste colours from colour swatches.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Shadowfyr   USA  (1,786 posts)  [Biography] bio
Date Reply #7 on Mon 27 Dec 2004 02:48 AM (UTC)
Message
Umm. The idea of addition color names was a global matter, as in any time you go to the color picker in Mushclient where it shows a list of names or you use a name in a script, it would list those you have saved as definitions in the main world, along with the standard set. Though.. This might require a custom picker, since the standard one for creating a new color only let you 'add' a new color to a set of sixteen. This never made much bloody sense to me, since most programs don't remember those custom colors between uses and it always defaults to replacing the first on in the set. If you click another, it replaces the color with what ever is in that box, losing you what they edited. Major screw up on MS' part imho. As a feature it is useless. lol

Anyway, my thought is that once you have picked a color and it is showing the dialog with the hex version, etc. and the list, there be an option on there to add it to the existing list. This would then be saved into the world file as a custom color which both the picker and even script for that world would recognize. I haven't used your new trigger generator, so I have no idea if it goes through the same "show a list, let you select 'other colour'" process and so on stuff. I assume it does, but even if not adding an option to "Add color to list" or something would seem possible. If you had to you could just change it so 'custom 1-16' are names in that list too, then have the custom color dialog let you add any names you want or change those colors, then it would just be a replacement for the existing 'custom colours' dialog. That would probably make a bit more sense anyway.
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #8 on Mon 27 Dec 2004 08:05 PM (UTC)

Amended on Mon 27 Dec 2004 08:06 PM (UTC) by Nick Gammon

Message
Yes, not a bad idea. However this is really an extension to the colour picker, not something for the highlight words feature as such.

I've added your comments as suggestion #537.

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


24,765 views.

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.

[Home]


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 HostDash]