GetAliasInfo
Script function

world.GetAliasInfo

DOC_scripting Read about scripting

Type

Method

Summary

Gets details about an alias

Prototype

VARIANT GetAliasInfo(BSTR AliasName, short InfoType);

DOC_data_types View list of data type meanings


Description

Gets details about the specified alias name.

You can obtain one of 29 "types" of information about the alias by specifying an "InfoType". The possible InfoTypes are:

1: What to match on (string)
2: What to send (string)
3: Script procedure name (string)
4: Omit from log (boolean)
5: Omit from output (boolean)
6: Enabled (boolean)
7: Regular expression (boolean)
8: Ignore case (boolean)
9: Expand variables (boolean)
10: Invocation count (long)
11: Times matched (long)
12: Menu (boolean)
13: Date/time alias last matched (date)
14: 'temporary' flag (boolean)
15: Alias was included from an include file (boolean)
16: Group name (string)
17: Variable name to set (string)
18: Send-to location (long)
19: 'keep-evaluating' flag (boolean)
20: Sequence number (long)
21: 'echo alias' flag (boolean)
22: 'omit from command history' flag (boolean)
23: User option value (long)
24: Number of matches to regular expression (most recent match) (long)
25: The string we matched against (last alias text matched against) (string)
26: Executing-script flag (boolean)
27: Script is valid flag (boolean)
28: Error number from PCRE when evaluating last match (long), zero if none
29: 'one shot' flag (boolean)

101: Wildcard %1 from last time it matched
102: Wildcard %2 from last time it matched
103: Wildcard %3 from last time it matched
104: Wildcard %4 from last time it matched
105: Wildcard %5 from last time it matched
106: Wildcard %6 from last time it matched
107: Wildcard %7 from last time it matched
108: Wildcard %8 from last time it matched
109: Wildcard %9 from last time it matched
110: Wildcard %0 from last time it matched

Other wildcards can be extracted by using GetAliasWildcard.

The word in brackets indicates the "type" of data returned.
String: a character string (eg. "north")
Boolean: TRUE or FALSE
Long: a 32-bit number

The field "invocation count" is a count of how many times the script routine was called.
The field "times matched" is a count of how many times the alias matched. These two would normally be the same, unless scripting was disabled, or there was an error in the script file.

The meanings of the "send-to" field are:

0: World
1: Command window
2: Output window
3: Status line
4: Notepad (new)
5: Notepad (append)
6: Log File
7: Notepad (replace)
8: Command queue
9: Send To Variable
10: Execute (re-parse as command)
11: Speedwalk (send text is speedwalk, queue it)
12: Script (send to script engine)
13: Immediate (send to world in front of speedwalk queue)
14: Script - after omit

If the named alias does not exist, EMPTY is returned. If the name given is invalid, NULL is returned. If the InfoType given is out of range, NULL is returned. (Use "IsEmpty" and "IsNull" to test for these possibilities).

See AddAlias for a description of the meanings of the fields.



VBscript example

world.note world.GetAliasInfo ("my_alias", 2)



Jscript example

/world.note(world.GetAliasInfo ("my_alias", 2));



PerlScript example

/$world->note ($world->GetAliasInfo ("my_alias", 2));



Python example

world.note(world.GetAliasInfo ("my_alias", 2))



Lua example

Note (GetAliasInfo("my_alias", 2))



Lua notes

Lua returns nil where applicable instead of an "empty variant" or "null variant".



Return value

The specified information about the alias, as described above.
An EMPTY variant, if the alias does not exist.
A NULL variant if the alias name is invalid.
A NULL variant if the InfoType is not a valid type.




See Also ...

Topics

DOC_aliases Aliases
DOC_mapper Auto-mapper
DOC_defaults Default triggers/aliases/timers/macros/colours
DOC_starting Getting started
DOC_group Groups
DOC_keypad Keypad navigation
DOC_macros Macro keys
DOC_plugins Plugins
DOC_regexp Regular Expressions
DOC_speed_walking Speed walking
DOC_timers Timers
DOC_triggers Triggers

Functions

FNC_AddAlias AddAlias (Adds an alias)
FNC_DeleteAlias DeleteAlias (Deletes an alias)
FNC_DeleteAliasGroup DeleteAliasGroup (Deletes a group of aliases)
FNC_DeleteTemporaryAliases DeleteTemporaryAliases (Deletes all temporary aliases)
FNC_EnableAlias EnableAlias (Enables or disables an alias)
FNC_EnableAliasGroup EnableAliasGroup (Enables/disables a group of aliases)
FNC_GetAlias GetAlias (Gets details about an alias)
FNC_GetAliasList GetAliasList (Gets the list of aliases)
FNC_GetAliasOption GetAliasOption (Gets the value of a named alias option)
FNC_GetAliasWildcard GetAliasWildcard (Returns the contents of the specified wildcard for the named alias)
FNC_GetInfo GetInfo (Gets information about the current world)
FNC_GetPluginAliasInfo GetPluginAliasInfo (Gets details about a named alias for a specified plugin)
FNC_GetPluginAliasList GetPluginAliasList (Gets the list of aliases in a specified plugin)
FNC_IsAlias IsAlias (Tests to see if an alias exists)
FNC_SetAliasOption SetAliasOption (Sets the value of a named alias option)

(Help topic: function=GetAliasInfo)

DOC_contents Documentation contents page