| Name | AddAlias |
|---|---|
| Type | Method |
| Summary | Adds an alias |
| Prototype | long AddAlias(BSTR AliasName, BSTR MatchText, BSTR ResponseText, long Flags, BSTR ScriptName); |
| Description | Adds a alias to the list of aliases. Name: name of this alias - may be empty Match_text: what to match on Response_text: what to send to the world Flags: various flags, see list below ScriptName: Which script subroutine to execute Flags The flags can be one or more of the constants below. For example, to enable the alias, and ignore the case of what was typed, the flags would be 33. Preferably use the constant declarations in your script file, and "OR" them together. E.g. VBscript: eEnabled or eIgnoreAliasCase JScript: eEnabled | eIgnoreAliasCase VBscript constants: const eEnabled = 1 ' enable alias const eIgnoreAliasCase = 32 ' ignore case when matching const eOmitFromLogFile = 64 ' omit this alias from the log file const eAliasRegularExpression = 128 ' alias is regular expressions const eExpandVariables = 512 ' expand variables like @direction const eReplace = 1024 ' replace existing alias of same name const eAliasSpeedWalk = 2048 ' interpret send string as a speed walk string const eAliasQueue = 4096 ' queue this alias for sending at the speedwalking delay interval const eAliasMenu = 8192 ' this alias appears on the alias menu const eTemporary = 16384 ' temporary - do not save to world file JScript constants: var eEnabled = 1; // same as for AddTrigger var eIgnoreAliasCase = 32; // ignore case when matching var eOmitFromLogFile = 64; // omit this alias from the log file var eAliasRegularExpression = 128; // alias is regular expressions var eExpandVariables = 512; // expand variables like @direction var eReplace = 1024; // replace existing alias of same name var eAliasSpeedWalk = 2048; // interpret send string as a speed walk string var eAliasQueue = 4096; // queue this alias for sending at the speedwalking delay interval var eAliasMenu = 8192; // this alias appears on the alias menu var eTemporary = 16384; // temporary - do not save to world file PerlScript constants: my $eEnabled = 1; # same as for AddTrigger my $eIgnoreAliasCase = 32; # ignore case when matching my $eOmitFromLogFile = 64; # omit this alias from the log file my $eAliasRegularExpression = 128; # alias is regular expressions my $eExpandVariables = 512; # expand variables like @direction my $eReplace = 1024; # replace existing alias of same name my $eAliasSpeedWalk = 2048; # interpret send string as a speed walk string my $eAliasQueue = 4096; # queue this alias for sending at the speedwalking delay interval my $eAliasMenu = 8192; # this alias appears on the alias menu my $eTemporary = 16384; # temporary - do not save to world file |
| VBscript example | |
| Jscript example | |
| PerlScript example | |
| Returns | eInvalidObjectLabel: The alias name is not valid |
See also ...