|
Dakina Novice
Joined: 22 Apr 2011 Posts: 36 Location: Colorado
|
Posted: Sun Aug 14, 2011 1:30 pm
Can you make a alias to make alias's? |
Hey Guys,
I want to make a alias for my whosX command
I was wondering if it wouuld work and if theres any special formats
Example,
I use whosrefiat to dissplay refiats real name and alts using #say
so alias is #alias {whosrefiat} {#say Nexus, Guy2, Guy3, Guy4, exc;#cw aqua}
Could I make a alias that I would type whosx Name1 Name 2 Name 3 Name 4 and it would output a alias like:
#alias {whosname1} {#say name 2, Name 3, Name 4;#cw aqua} ? |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Sun Aug 14, 2011 3:49 pm |
A more efficient way would probably be to store all the information into a database variable, such as:
Code: |
whodatabase = {refiat="Nexus|Guy2|Guy3|Guy4"|x="Name1|Name2|Name3|Name4"|y="Name1|Name2"} |
Then your alias can changed to #ONINPUT and done like this:
Code: |
#ONINPUT {^whos(*)} {#IF (%iskey(@whodatabase,%1)) {#SAY {%expandlist(%db(whodatabase,%1),", ")};#CW aqua}} |
To make adding names easier, you can also do:
Code: |
#ALIAS addwhos {#IF (%iskey(@whodatabase, %1)) {#ADDKEY whodatabase %1 %additem(%-2,%db(whodatabase, %1))} {#ADDKEY whodatabase %1 %-2}} |
Then you'd just type:
Code: |
addwhos refiat Nexus|Guy1|Guy2|Guy3|Guy4 |
Hope this helps you out! |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|