[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]  Suggestions
. . -> [Subject]  ColourPicker and scripting: how about some improvements?

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: ColourPicker and scripting: how about some improvements?
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by Worstje   Netherlands  (867 posts)  [Biography] bio
Date Sat 21 Apr 2012 03:30 PM (UTC)  quote  ]
Message
... This is embarrasing! I even searched the documentation before I posted, and all I came up with was the DoCommand() variety.

Apologies!
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Sat 21 Apr 2012 09:18 AM (UTC)  quote  ]
Message
Template:function=PickColour PickColour

The documentation for the PickColour script function is available online. It is also in the MUSHclient help file.


- Nick Gammon

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

Posted by Worstje   Netherlands  (867 posts)  [Biography] bio
Date Fri 20 Apr 2012 10:06 AM (UTC)  quote  ]
Message
I _love_ the MUSHclient colour picker. It's awesome.

And yet I'm sad I can't really do much with it from a script. Sure, I can do this:

world.DoCommand("ColourPicker")

but I'd love to do so much more with it, as that doesn't help me much. Let me explain.

Basically, I want to use it to configure colours for one of my plugins. I've got a listing with settings, and for the colour settings I show the colour in its hex notation. Now I want to add a 'modify' link, have the picker pop up, let the use select a color and hit OK.. and then have my script update its setting in response.

There's several ways this could be implemented, but if it is easiest for you, something like utils.inputbox would be fine despite the lack of support for other scripting engines. And rather than copying the contents, all 'OK'-like exits from the dialog should not copy to the clipboard, but simply return the value.

Parameters like initial_color, title and sort direction (including 'whatever it was last time') are a must. Maybe a flag that lets the function return the value closest to the kind the user clicked on (e.g. MXP, MUSHclient colour name, Lua, etc.) would be nice as well, but a simple int color return value is just fine by me.

The exact details I'd leave to you. Personally, I feel that if I can select a colour and use it the dialog in my script without confusing my users, I'll be more than happy enough! :)
[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.


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