Register forum user name Search FAQ

MUSHclient scripting

Description of MUSHclient world function: world.ShiftTabCompleteItem


Name ShiftTabCompleteItem
Type Method
Summary Adds an item to the list shown for Shift+Tab completion
Prototype long ShiftTabCompleteItem(BSTR Item);
Description

Lets you add an item to the menu that pops up when you type a partial word and hit Shift+Tab in the command window.

The default is, if you type a partial script function name and hit Shift+Tab it will complete the function, as an aid to writing scripts, eg.

col<Shift+Tab> suggests ColourNameToRGB, ColourNote and ColourTell.

Now you can add items of your own to the list (for example, Python functions).

To do this, use this function for each additional word.

For example:

ShiftTabCompleteItem ("repeat")
ShiftTabCompleteItem ("until")
ShiftTabCompleteItem ("while")

You should use the correct capitalization that you want in the finished word.

Words must start with a letter, and then be alphanumeric (A-Z, a-z, 0-9) plus period, underscore, hyphen.

You can use three special words for additional control:

ShiftTabCompleteItem ("<clear>") --> clears the list of user-added items
ShiftTabCompleteItem ("<nofunctions>") --> suppresses the completion of script function names (like ColourTell)
ShiftTabCompleteItem ("<functions>") --> allows the completion of script function names

These items are not saved in the world file, they should be loaded each time.

You might use the "<nofunctions>" action if you were simply planning to play the MUD, and didn't want script functions popping up in the menu.


Note: Available in version 4.30 onwards.


VBscript example
ShiftTabCompleteItem "Function"
ShiftTabCompleteItem "While"
ShiftTabCompleteItem "vbTrue"
ShiftTabCompleteItem "vbFalse"
Lua example
ShiftTabCompleteItem ("repeat")
ShiftTabCompleteItem ("until")
ShiftTabCompleteItem ("while")


-- special strings

ShiftTabCompleteItem ("<clear>")   --> clears the list of user-added items
ShiftTabCompleteItem ("<nofunctions>")  -->  suppresses the completion of script function names (like ColourTell)
ShiftTabCompleteItem ("<functions>")  --> allows the completion of script function names
Returns eBadParameter: Empty string supplied, string > 30 characters, or string contains invalid characters
eOK: Added OK
Introduced in version 4.30

Search for script function

Enter a word or phrase in the box below to narrow the list down to those that match.

The function name, prototype, summary, and description are searched.

Search for:   

Leave blank to show all functions.


Return codes

Many functions return a "code" which indicates the success or otherwise of the function.

You can view a list of the return codes


Function prototypes

The "prototype" part of each function description lists exactly how the function is called (what arguments, if any, to pass to it).

You can view a list of the data types used in function prototypes


View all functions

[Back]

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.