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
➜ Suggestions
➜ ColourPicker and scripting: how about some improvements?
ColourPicker and scripting: how about some improvements?
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Worstje
Netherlands (899 posts) Bio
|
Date
| Fri 20 Apr 2012 10:06 AM (UTC) |
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! :) | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #1 on Sat 21 Apr 2012 09:18 AM (UTC) |
Message
| |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Worstje
Netherlands (899 posts) Bio
|
Date
| Reply #2 on Sat 21 Apr 2012 03:30 PM (UTC) |
Message
| ... This is embarrasing! I even searched the documentation before I posted, and all I came up with was the DoCommand() variety.
Apologies! | 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.
15,087 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top