Difference between revisions of "Alias"
m |
(→#Alias) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | ==#Alias== | + | {{FoCW Header|Alias|A Guide to Save Common Inputs}} |
+ | |||
+ | == #Alias == | ||
This feature was added to the EL client a little while ago by Alvie. | This feature was added to the EL client a little while ago by Alvie. | ||
Line 10: | Line 12: | ||
''<nowiki>#</nowiki>alias <number> <message>'' | ''<nowiki>#</nowiki>alias <number> <message>'' | ||
− | where <number> is | + | where <number> is 0-99 |
Then to use the alias: | Then to use the alias: | ||
Line 16: | Line 18: | ||
''<nowiki>#</nowiki><number>'' | ''<nowiki>#</nowiki><number>'' | ||
− | + | e.g. | |
− | e.g. | + | ''<nowiki>#</nowiki>alias 1 #gm Hello World |
− | + | <nowiki>#</nowiki>1'' | |
− | ''<nowiki>#</nowiki>alias 1 #gm Hello World | ||
− | <nowiki>#</nowiki>1'' | ||
− | |||
would say <nowiki>#</nowiki>gm Hello World. | would say <nowiki>#</nowiki>gm Hello World. | ||
Line 29: | Line 28: | ||
''<nowiki>#</nowiki>unalias <number>'' | ''<nowiki>#</nowiki>unalias <number>'' | ||
− | + | e.g. | |
− | e.g. | + | ''<nowiki>#</nowiki>unalias 1'' |
− | ''<nowiki>#</nowiki>unalias 1'' | ||
would remove the alias we created earlier. | would remove the alias we created earlier. | ||
Line 37: | Line 35: | ||
You can list all the aliases you have made by typing #aliases. | You can list all the aliases you have made by typing #aliases. | ||
− | Advanced Features | + | == Advanced Features: arguments == |
You can also create aliases that accept arguments. For example, if you often advertise in the market " I'm selling Life Essences @ 4 gc each pm me for details (not a bot) ". You could alias the text so that it allows any item: | You can also create aliases that accept arguments. For example, if you often advertise in the market " I'm selling Life Essences @ 4 gc each pm me for details (not a bot) ". You could alias the text so that it allows any item: | ||
− | + | ''<nowiki>#</nowiki>alias 1 @@3 I'm selling $0 @ $1 gc each pm me for details (not a bot) '' | |
− | ''<nowiki>#</nowiki>alias 1 @@3 | ||
− | |||
Then to send your advert : | Then to send your advert : | ||
− | + | ''<nowiki>#</nowiki>1 "Life Essence" 4'' | |
− | ''<nowiki>#</nowiki>1 "Life Essence" 4'' | ||
− | |||
or to advertise Fox Fur @ 5 gc (for example) | or to advertise Fox Fur @ 5 gc (for example) | ||
+ | ''<nowiki>#</nowiki>1 "Fox Fur" 5'' | ||
− | |||
+ | Note: the arguments are space separated so if you want 2 words to be 1 argument, use set of double quotes (""). | ||
− | + | Finally, the aliases are recursive so, continuing the advert example, if you had an advert you sent all the time, you could do: | |
+ | ''<nowiki>#</nowiki>alias 2 <nowiki>#</nowiki>1 "Life Essence" 4'' | ||
− | + | then typing <nowiki>#</nowiki>2 would send: @@3 I'm selling Life Essences @ 4 gc each pm me for details (not a bot) | |
− | |||
+ | If you don't pass enough arguments as required, an error will be shown | ||
+ | Text alias requires parameters, but none given | ||
− | + | Extra arguments are ignored silently without an error. |
Latest revision as of 01:44, 14 January 2012
#Alias
This feature was added to the EL client a little while ago by Alvie. This is a short tutorial written by Minion07 and editted to fit in wiki.
#alias lets you save something you type a lot. e.g. instead of typing #gm Hello All! , you could just type #1.
To alias something, type:
#alias <number> <message>
where <number> is 0-99
Then to use the alias:
#<number>
e.g. #alias 1 #gm Hello World #1
would say #gm Hello World.
To remove aliases, type:
#unalias <number>
e.g. #unalias 1
would remove the alias we created earlier.
You can list all the aliases you have made by typing #aliases.
Advanced Features: arguments
You can also create aliases that accept arguments. For example, if you often advertise in the market " I'm selling Life Essences @ 4 gc each pm me for details (not a bot) ". You could alias the text so that it allows any item:
#alias 1 @@3 I'm selling $0 @ $1 gc each pm me for details (not a bot)
Then to send your advert :
#1 "Life Essence" 4
or to advertise Fox Fur @ 5 gc (for example)
#1 "Fox Fur" 5
Note: the arguments are space separated so if you want 2 words to be 1 argument, use set of double quotes ("").
Finally, the aliases are recursive so, continuing the advert example, if you had an advert you sent all the time, you could do:
#alias 2 #1 "Life Essence" 4
then typing #2 would send: @@3 I'm selling Life Essences @ 4 gc each pm me for details (not a bot)
If you don't pass enough arguments as required, an error will be shown
Text alias requires parameters, but none given
Extra arguments are ignored silently without an error.