Register forum user name Search FAQ

MUSHclient scripting

Description of MUSHclient world function: world.GetAliasList


Name GetAliasList
Type Method
Summary Gets the list of aliases
Prototype VARIANT GetAliasList();
Description

Returns an array of all the named aliases currently defined. You can then use GetAlias or GetAliasInfo for more details about each one.

Note - from version 3.40 onwards GetAliasList returns all aliases, even unlabelled ones. The unlabelled aliases will have assigned an "internal" label (like "*alias42") that can be used in GetAliasInfo, and similar routines.

VBscript example
dim alList

alList = world.GetAliasList

If Not IsEmpty (alList) then

  For Each name In alList 
    world.Note name
  Next

End If
Jscript example
aliaslist = new VBArray(world.GetAliasList()).toArray();

if (aliaslist)  // if not empty
 for (i = 0; i < aliaslist.length; i++)
   world.note(aliaslist [i]);
PerlScript example
foreach $item (Win32::OLE::in ($world->GetAliasList))
 {
 $world->note($item);
 }
Python example
aliaslist = world.GetAliasList
if (aliaslist ):
  for a in aliaslist : world.Note (a)
Lua example
al = GetAliasList()
if al then
  for k, v in ipairs (al) do 
    Note (v) 
  end  -- for
end -- if we have any aliases
Lua notes
Lua returns nil where applicable instead of an "empty variant".
Returns If there are no aliases (with names) then the return value is empty. Use "IsEmpty" to test for this possibility.

Otherwise, it returns a variant array containing the names of all the aliases. Use "ubound" to find the number of aliases in the list. You can then use "GetAlias" to find details about each alias.

See also ...

Function Description
AddAlias Adds an alias
DeleteAlias Deletes an alias
EnableAlias Enables or disables an alias
GetAlias Gets details about an alias
GetAliasInfo Gets details about an alias
IsAlias Tests to see if an alias exists

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.