Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Engine
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
Engine:CCMD alias
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{dev/uiccmd}} Creates a new alias with a callable script in the current context, replacing existing alias if any. <kua>alias bob "echo fred"</kua> == Arguments == * name - name for the new alias * value (optional) - script string or command to set as an alias. If not supplied, then prints the alias script value if the alias exists. == Associations == * Is by default placed in the 'global' context. == Details == An 'alias' acts like a custom command. It runs the assigned text as a script, which can contain a single-word command, statement, or script. Is used to create a custom command in the current context. Aliases do not have any parameters and will run the command, statement, or script verbatim. If for example, an alias named 'bob' is set to 'echo', it will always run exactly 'echo' which will print nothing, even if you run 'bob "some text". Here the second parameter was ignored. Thus, aliases act like simple static macros. But when run they can do anything a script in the same context run by any other means could do. And because aliases are treated like commands, they can use the special key state associations. By default, only aliases in the 'global' context will be found by key bindings using 'bind'. == Examples == === Default values === * Check alias 'bob' for script value. No alias exists named 'bob'. <kua> > alias bob Unknown: bob </kua> * Call 'bob'. No command, variable or alias named 'bob' exist. <kua> > bob Unknown: bob </kua> * Create an alias 'bob' and set to 'echo fred'. <kua> > alias bob "echo fred" </kua> * Same as the second example, but now alias 'bob' exists. The 'echo' command in the 'bob' alias script runs, and prints 'fred'. <kua> > bob fred </kua> * Same as the first example, but now alias 'bob' exists and shows the value of the alias 'bob' <kua> > alias bob 'bob' is 'echo fred' </kua> === To a variable === * 'bob' called without a value. No command, variable or alias named 'bob' exist. <kua> > bob Unknown: bob </kua> * Create an alias 'bob' and set to 'fred'. <kua> > alias bob fred </kua> * Same as the first example, but now alias 'bob' exists. The 'fred' command in the 'bob' alias script runs, and 'fred' doesn't exist. <kua> > bob Unknown: fred </kua> * Create variable 'fred'. <kua> > var fred james </kua> * Run 'bob' <kua> > bob 'fred' is 'james' </kua> * Try to set 'fred' through 'bob'. Value remains the same because 'bob' is only the statement "fred". <kua> > bob alan > bob 'fred' is 'james' </kua> == Notes == *
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Crumb
(
edit
)
Template:Crumbtext
(
edit
)
Template:Dev/uiccmd
(
edit
)
Template:Editlink
(
edit
)
Template:Engine/devnav
(
edit
)
Template:Tocright
(
edit
)