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 ➜ General ➜ Format description

Format description

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


Posted by Hadar   (3 posts)  Bio
Date Sun 22 Jan 2017 06:19 AM (UTC)
Message
I have been all over the place

Not exactly sure if possible without making a function then calling the function, but I was wondering if there was a way to "format" a description, i basically don't want my "help file" to be one color.

I am pretty sure ill have to do a function, just wanted to check before i set it up though
Top

Posted by Fiendish   USA  (2,535 posts)  Bio   Global Moderator
Date Reply #1 on Sun 22 Jan 2017 12:28 PM (UTC)

Amended on Sun 22 Jan 2017 12:34 PM (UTC) by Fiendish

Message
More information needed. What description?

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #2 on Sun 22 Jan 2017 09:04 PM (UTC)
Message
Are you coding a MUD server? And you want the help files to be shown in various colours? Then embed colour codes inside the help. What is usually done in this case is to use easy-to-use sequences (eg. @R for bold red, and @r for dim red, @G for bold green, etc.) and then have the server do a find-and-replace to change them to ANSI colour sequences.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Hadar   (3 posts)  Bio
Date Reply #3 on Mon 23 Jan 2017 04:51 AM (UTC)
Message
was talking about this part in the code:


<description trim="y">
<![CDATA[
Just use the command predict to take a guess at the next hour of double
]]>
</description>


that way i can just call the function to display it, i ended up making a function:


function HadarHelp()
	ColourNote("#159FE5","","+---------------------------------","Green","","[","Cyan","","D","Teal","","ouble ","Cyan","","P","Teal","","redictor","Green","","]","#159FE5","","---------------------------------+")
	ColourNote("#159FE5","","|"..string.format("%84s"," ").."|")
	ColourNote("#159FE5","","|","#E55B15","",string.format("%-19s"," Predict <Channel>"),"#159FE5","","-","#F1D566","",string.format("%-64s"," Outputs an estimate to a channel when double might happen"),"#159FE5","","|")
	ColourNote("#159FE5","","|"..string.format("%84s"," ").."|")
	ColourNote("#159FE5","","+"..string.rep("-",84).."+")
end



I mean if there is an easier way, then ill do it, if not ill just add the function to all my scripts
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #4 on Mon 23 Jan 2017 05:43 AM (UTC)
Message
OK, that description is shown if you click on "Show Info" in the plugins list.

It is also echoed by the default alias made by the plugin wizard (for your "help" action).

For example:

function OnHelp ()
Note (GetPluginInfo (GetPluginID (), 3))
end

Plugin info 3 is the contents of that description box.


However you can of course make your own help action (like you have already) which shows lots of colours. I think some plugin writers do that already.

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