|
Atreides_096 Wanderer
Joined: 21 Jan 2005 Posts: 99 Location: Solvang, CA
|
Posted: Thu Sep 28, 2006 8:41 pm
Wildcards in alias names or #oninput syntax |
I'm looking for a way to gag the original input when a #oninput trigger is activated, or to set up wild cards in aliases. By this what I mean is, if I have a trigger:
Code: |
#oninput {^mh-(%w)$} {#exe %db(@MH_DB, %1)} |
I'd like it to send just the exe command, and not the original typed command. Alternatively, an alias that did the same thing would be fine. I've experiemented with #gag, #sub, etc..I can't seem to get it right. Any suggestions? Thanks a lot :) |
|
|
|
Seb Wizard
Joined: 14 Aug 2004 Posts: 1269
|
Posted: Thu Sep 28, 2006 9:32 pm |
Do you have to type something of the form {^mh-(%w)$}? Is typing something like {^mh (%w)$} not OK? If it is OK then you can just make "mh" an alias, and %1 is the 1st argument you give to the mh alias. I expect you know this though!
|
|
|
|
Atreides_096 Wanderer
Joined: 21 Jan 2005 Posts: 99 Location: Solvang, CA
|
Posted: Thu Sep 28, 2006 9:56 pm |
Nods I do know... the problem is I've got about 8000 aliases (mostly speedwalks) all in that format... XX-XX. After years of having this style of settings, it's incredibally tough to break the typing habit.. but it's been an issue for a long time that my settings file is too big because of this, and I'm looking for a way to condense it. Since the aliases are used in a sort of speed competition, I don't really want to change it all if it's avoidable.
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Thu Sep 28, 2006 11:10 pm |
Use #SUB instead of #EXEC with your #ONINPUT triggers.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Atreides_096 Wanderer
Joined: 21 Jan 2005 Posts: 99 Location: Solvang, CA
|
Posted: Thu Sep 28, 2006 11:33 pm |
The problem is, I'm trying to link an alias out of the database.. (there's a command on the MUD, "run" which makes speedwalking faster. Run is also an alias for me, sent as ~run, which updates mapper location). Using #sub just sends a parsed output to the mud... how do I sub it into an executed alias?
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Fri Sep 29, 2006 9:18 am |
Using just your run command in the trigger will also do the substitute. Failing that, you can use #GAG to cause the original text to not be sent then use use your command.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
|
|