 |
chamenas Wizard

Joined: 26 Mar 2008 Posts: 1547
|
Posted: Thu Mar 27, 2008 2:16 pm
Alias command config |
if I have something aliased that was:
w>
Is there any way I can have it take whatever comes after it, without a preceding white space.
currently I have to
w> text |
|
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Mar 27, 2008 2:41 pm |
Be more specific; I have no idea what you mean. Some script examples might help. However, you can't use > in an alias name. Alias names can only be letters and underscores.
|
|
|
|
 |
chamenas Wizard

Joined: 26 Mar 2008 Posts: 1547
|
Posted: Thu Mar 27, 2008 4:16 pm |
w> works just fine for me as an alias, it's just that normally it needs a whitespace to separate the alias name from any text that may come after it... here's mine:
#AL w> {pmote ~{wwhispers~(to ~{c%1~{w) '~{c%-2~{w'~{x}
So, you type
w> Bob Hey, come check this out.
You whisper (to Bob) Hey, come check this out.
I want to be able to do...
w>Bob Hey, come check this out.
You whisper (to Bob) Hey, come check this out. |
|
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Mar 27, 2008 4:35 pm |
You could use a trigger with the Command Input type selected. They're exactly the same as normal triggers, but they fire on commands you enter rather than text from the MUD. You'd want a trigger like:
#oninput {^w>(%w) (*)} {#noinput;pmote whisper ~(to %1~) %2}
or whatever it was.
And okay, you're not supposed to be able to use other characters for aliases. I wouldn't advise it. |
|
|
|
 |
chamenas Wizard

Joined: 26 Mar 2008 Posts: 1547
|
Posted: Thu Mar 27, 2008 4:57 pm |
>
Is the direct command in the MUD, hence why I wanted to use it :/ |
|
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Mar 27, 2008 5:31 pm |
...I'm not sure what you want now. You can use the > character fine with no space in the way I just described, with input triggers. Do you want the > character in the script or something?
|
|
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Mar 27, 2008 5:34 pm |
Aliases *require* a space between the alias name and the arguments. Yes, you can use a > in an alias name if you must, but it is not recommended. But with an alias, the space after the w> would be required.
Fang mentioned the correct way to do it without needing the space is using the #ONINPUT trigger. That's basically a trigger that fires on the contents of the command line and can be used to parse the command line any way you want. |
|
|
|
 |
chamenas Wizard

Joined: 26 Mar 2008 Posts: 1547
|
Posted: Thu Mar 27, 2008 5:41 pm |
| Fang Xianfu wrote: |
| ...I'm not sure what you want now. You can use the > character fine with no space in the way I just described, with input triggers. Do you want the > character in the script or something? |
No, it worked just fine. I'm just explaining why I use a > character. Thank you very much for the trigger. |
|
|
|
 |
|
|
|