Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Dita
Newbie


Joined: 14 Dec 2005
Posts: 2

PostPosted: 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)
Reply with quote
gamma_ray
Magician


Joined: 17 Apr 2005
Posts: 496

PostPosted: 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.
Reply with quote
Pseudo
Wanderer


Joined: 25 Oct 2005
Posts: 99

PostPosted: 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.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: 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.
Reply with quote
Dita
Newbie


Joined: 14 Dec 2005
Posts: 2

PostPosted: 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 :-)
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4789
Location: Pensacola, FL, USA

PostPosted: Sat Dec 17, 2005 6:37 pm   
 
%0 does infact work for backwards compatability, but %-1 is preferred
_________________
Discord server
Reply with quote
gamma_ray
Magician


Joined: 17 Apr 2005
Posts: 496

PostPosted: 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.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4789
Location: Pensacola, FL, USA

PostPosted: Sun Dec 18, 2005 10:00 pm   
 
Try

#ALIAS tester {
#show ~%0: %0
#show ~%-1: %-1
}
_________________
Discord server
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: 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
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net