[Home] [Downloads] [Search] [Help/forum]


Script function


Read about scripting




Gets the list of aliases


VARIANT GetAliasList();

View list of data type meanings


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

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))

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".

Return value

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


Default triggers/aliases/timers/macros/colours
Getting started
Keypad navigation
Macro keys
Regular Expressions
Speed walking


(AddAlias) Adds an alias
(DeleteAlias) Deletes an alias
(DeleteAliasGroup) Deletes a group of aliases
(DeleteTemporaryAliases) Deletes all temporary aliases
(EnableAlias) Enables or disables an alias
(EnableAliasGroup) Enables/disables a group of aliases
(GetAlias) Gets details about an alias
(GetAliasInfo) Gets details about an alias
(GetAliasOption) Gets the value of a named alias option
(GetAliasWildcard) Returns the contents of the specified wildcard for the named alias
(GetPluginAliasInfo) Gets details about a named alias for a specified plugin
(GetPluginAliasList) Gets the list of aliases in a specified plugin
(GetPluginAliasOption) Gets the value of a named alias option for a specified plugin
(IsAlias) Tests to see if an alias exists
(SetAliasOption) Sets the value of a named alias option

(Help topic: function=GetAliasList)

Documentation contents page

Search ...

Enter a search string to find matching documentation.

Search for:   

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]