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:
[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...
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:
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:
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.
|