 |
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: Fri Dec 07, 2007 8:41 pm
Question about #gag with text from an alias |
I have a situation where an alias generates commands that are sent to the MUD. While I want them sent to the MUD, I don't want them displayed on my screen. In Zmud I took care of this with a pattern trigger which gagged it but still allowed it to be sent.
In CMUD pattern triggers aren't firing on output from aliases, just test from the MUD. Oninput triggers don't match on this either, they only fire on test that comes from the command line.
Is the appropriate place to gag this in the alias that generates the commands itself? I do an #exec command and then #gag on the next line? |
|
|
|
 |
Vijilante SubAdmin

Joined: 18 Nov 2001 Posts: 5187
|
Posted: Fri Dec 07, 2007 8:54 pm |
The correct command to use with version 1.34 to send text to the mud but never display it is #SEND.
As of the 2.11 (mayber 2.10 or 2.12) beta the correct command to do the same is #SENDRAW. #SEND got readjusted to allow #ONINPUT triggers to act while skippings alias checking. #SENDRAW bypasses everything the way #SEND used to.
You can do #GAG in an alias that you expect to be called from the command line. It will remove the most current display line which will be where you sent the command. It will also remove any other text that was displayed on that line. This may be more advantageous then using either #SEND or #SENDRAW when one wants any prompt that may have been present to also be removed.
Consider if you will this, press CTRL-Q which displays 1000 lines of text, then enter at the command line
You should see that the usage of #GAG removes the lines from the CTRL-Q test from the scrollback. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
 |
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: Fri Dec 07, 2007 9:05 pm |
Ah, this is very enlightening. I did experiment with #send (version 2.14a) and I was noticing that it sent only the first word of the command I was trying to send. Subsequent experiments included using braces to try to group it, but failed.
Using your suggestion I came up with this example:
#local $var1 $var2
$var1 = pr
$var2 = pack
#sendraw {$var1 $var2}
This will group together multiple words with variable substitution. I think this what you had in mind. |
|
|
|
 |
|
|
|