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
➜ Ideas for more script routines
|
Ideas for more script routines
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Sat 27 Apr 2002 02:12 AM (UTC) |
| Message
| I am in the process of adding some enhancements to MUSHclient right now. If anyone wants some (additional) script interfaces now is the time to speak up.
I get the impression there are some keen scripters out there, so if there is a script interface that would simplify your life, post a message here in reply.
For example, one I have in mind is to get the text of any line, eg.
sLine = world.getline (4520)
That would return whatever line 4520 had in it. You could use this in scripts to go over existing text in the output window.
Another handy one might be to do regular expressions from within a script.
The ideas most likely to make it into the very next version are things that can be fairly easily done. That is, things that already exist (like the contents of a line, or the count of triggers, or the time connected to the world), but just aren't exposed to scripting yet. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Shadowfyr
USA (1,792 posts) Bio
|
| Date
| Reply #1 on Sat 27 Apr 2002 03:44 AM (UTC) |
| Message
| Like I said in my other post. My vote would be:
world.OnCommand(STR command_string)
Aliases, etc. aside things like directional movement or just commands in general that you don't want 80 million aliases for would be nice to 'catch' as they are used. In the case of the keypad it is currently not even possible to catch them. It would be much more versitile to be able to call a single script and use a 'select case' to pull up a command than generate a lot of aliases, especially if they all called the same script anyway. ;) | | Top |
|
| Posted by
| Magnum
Canada (580 posts) Bio
|
| Date
| Reply #2 on Sat 27 Apr 2002 04:42 PM (UTC) |
| Message
| I've mentioned this before, it is still something I would like to see:
Variations related to the "SetCommand" function:
GetCommand
ClearCommand
PushCommand
PopCommand
GetCommandStack
HighlightCommand
PushCommand would push whatever is on the command line to the stack, and clear the command line.
PopCommand would pop whatever is most recent on the stack, back to the command line. Perhaps an optional argument could be accepted, for how far back in the stack to pop a command, or even a keyword argument that pops the last command containing the keyword!
GetCommandStack would work similar to GetVariableList, except would return a list of commands on the stack.
HighLightCommand would highlight the text in the Command box.
The trigger option: "send to Command" would be changed so that the command sent would be highlighted. Also, SetCommand should be altered so it highlights the command that is sent to the command box.
In truth, it isn't very likely that I would use any of the commands I've offered here. Mostly, I just want text sent to the command box highlighted. I use triggers to send text to the command box when I enter certain rooms, but I really wish the text was highlighted, because sometimes I don't want to issue the command, and it would be easier to just start typing something new (thereby erasing what was highlighted).
...So, my biggest request is for "HighlightCommand". If nothing else is done, I could at least call a script to "SetCommand", then "HighlightCommand".
If I wanted to ensure the command would go to the command box, no matter what, then I would "PushCommand", "SetCommand", "HighLightCommand". Since the command is highlighted, if I don't want to use it, I could press up arrow to get my old text back, or just start typing a new command...
Yadda Yadda, Blah Blah... Thanks for listening... :) |
Get my plugins here: http://www.magnumsworld.com/muds/
Constantly proving I don't know what I am doing...
Magnum. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #3 on Sun 28 Apr 2002 03:36 AM (UTC) |
| Message
| |
| Posted by
| Magnum
Canada (580 posts) Bio
|
| Date
| Reply #4 on Sun 28 Apr 2002 05:43 AM (UTC) |
| Message
| Wow, rockin!
I had a feeling it would be relatively easy to code most of my requests, since you were probably able to call routines that already existed in the program, but were only available via keyboard or menu actions.
One final, minor request: If the trigger option "send to: Command" automatically 'Selects' the text that is pushed to the command box, it would save having to write any script at all, for those who don't care if it fails if text was already in the command box. Alternatively, you could create a new option, "send to: Command (Selected)" which would accomplish the task.
I don't mean to get ambitious, but you could even make a third option, "send to: Command (Replace)", which would essential do the same as: PushCommand,SetCommand & [if you choose] SelectCommand.
I know... if you did all this, it would reduce the usefulness of having the ability to do the same via script (now that you have added it).
I'm for optimum performance, so if doing all this stuff that I just suggested might bloat the program, don't worry about it. :)
Thanks again, for implementing my suggestion! You rock! :) |
Get my plugins here: http://www.magnumsworld.com/muds/
Constantly proving I don't know what I am doing...
Magnum. | | Top |
|
| Posted by
| Magnum
Canada (580 posts) Bio
|
| Date
| Reply #5 on Mon 29 Apr 2002 06:48 PM (UTC) |
| Message
| |
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #6 on Sat 04 May 2002 12:08 AM (UTC) |
| Message
| | Go to global configuration, and uncheck "Notify me when connection broken". This is available now. |
- 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.
18,449 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top