 |
Dita Newbie
Joined: 14 Dec 2005 Posts: 2
|
Posted: Sat Dec 17, 2005 7:40 am
Moving #gaged lines to new window |
Hi all,
I wanted to ask whether someone could give me a hint whether it is possible to #gag lines in my main window and simultaneously let them be printed to to another window.
(My intent is to seperate timecritical data and general output in order to unclutter my main window) |
|
|
|
 |
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Sat Dec 17, 2005 8:06 am |
Make a trigger for the pattern you want to gag/redirect, and in the body of the trigger include #gag and #window nameofwindow %0, where nameofwindow is the name of the window you want to redirect to.
|
|
|
|
 |
Pseudo Wanderer
Joined: 25 Oct 2005 Posts: 99
|
Posted: Sat Dec 17, 2005 12:53 pm |
Taken from the help on #CAPTURE:
| Quote: |
#TRIGGER {tells you} {#CAP tell;#GAG}
When a line containing the string ‘tells you’ is received from the MUD, the capture command copies the line to the tell window, and then gags it from the current window.
|
Please note, the "tell" that "#CAP tell" is referring to is the name of the new created window. You could redirect all unnecessary output to one window this way. |
|
|
|
 |
TonDiening GURU

Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Sat Dec 17, 2005 12:55 pm |
#TRIGGER {Pattern here} {#CAP WindowName;#GAG}
%0 probably will not be compatible in the future or isn't now. |
|
|
|
 |
Dita Newbie
Joined: 14 Dec 2005 Posts: 2
|
Posted: Sat Dec 17, 2005 4:46 pm |
Thank you all very much, I will try your suggestions after I got drunk(well ok only tispy i guess) on mead at the local (uh... Christmas market? Weihnachtsmarkt in german)... Would like to try it now... but there no time...
Thanks again :-) |
|
|
|
 |
shalimar GURU

Joined: 04 Aug 2002 Posts: 4789 Location: Pensacola, FL, USA
|
Posted: Sat Dec 17, 2005 6:37 pm |
%0 does infact work for backwards compatability, but %-1 is preferred
|
|
|
|
 |
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Sun Dec 18, 2005 9:55 pm |
I did a bit of testing just now and I couldn't get %-1 to do anything, while %0 always stored the entire line as expected... for reference:
| Code: |
#REGEX {^The following members of the clan .*} {
#show ~%0: %0
#show ~%-1: %-1
}
|
Where "^The following members of the clan .*" is a string that I can easily request from the mud. |
|
|
|
 |
shalimar GURU

Joined: 04 Aug 2002 Posts: 4789 Location: Pensacola, FL, USA
|
Posted: Sun Dec 18, 2005 10:00 pm |
Try
#ALIAS tester {
#show ~%0: %0
#show ~%-1: %-1
} |
|
|
|
 |
nexela Wizard

Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Sun Dec 18, 2005 10:00 pm |
%-1 is for Aliases and if I remember correctly it is explained in this helpfile #ALIAS
%0 is for Aliases or Triggers but don't count on it sticking around, it has been replaced with %line and %trigger |
|
|
|
 |
|
|
|