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.
 Entire forum ➜ MUSHclient ➜ General ➜ New help facility for scripting

New help facility for scripting

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


Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Tue 29 Nov 2005 11:42 PM (UTC)

Amended on Sat 22 Dec 2007 07:32 PM (UTC) by Nick Gammon

Message

Version 3.70 has a couple of new features for scripters.

Often I find myself writing a script and wanting to know the exact spelling (including capitalization) of a script function, or what its arguments are. This information is all in the help file, but it can take a few mouse-clicks to reach it.

The new functionality of version 3.70 makes this all much simpler.

A new menu item Game -> Functions List displays all inbuilt script functions, like this:

Script functions list - 13K

[EDIT] In newer versions the menu item is in Help -> Functions List.

This is for the case where you simply want to browse all functions. You can get a subset by typing some text into the "filter" box, which makes the list instantly redisplay with only functions matching what you typed...

Functions list, filtered - 6K

As soon as you select a function, and click OK (or double-click the function name) the appropriate page of the help file is displayed.

If you only need the correct spelling of the function name, simply click the "Copy" button, and the function name will be copied to the Clipboard.

The "Lua" button shows the help page relating to all the Lua-specific functions.

Auto-selection of function name

As an added feature, if you are using the inbuilt notepad, or are editing in the "send to script" window, you can position the cursor over a word, and click on the "Function" button, and the selected word will be used as the filter:

Using function list from script editor - 3K

This is particularly useful when you just want to check on the purpose of a function in an existing script. In this case the cursor is somewhere inside the word "ColourNote", so that function is filtered and selected:

Selected function displayed - 4K


There is also a script interface to this functionality. You can simply type:


/Help "trigger"

This would show the functions list, with "trigger" as the filter. However if an exact match can be found, the help for that function is opened immediately.


- Nick Gammon

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

Posted by Mccane   (28 posts)  Bio
Date Reply #1 on Sat 22 Dec 2007 01:56 PM (UTC)
Message
The Functions List is stored under the Help > Functions List instead of Game > Functions List now.
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #2 on Sat 22 Dec 2007 07:31 PM (UTC)
Message
Correct. In later versions I moved the menu item to a more logical place.

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