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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
kjaerhus
Magician


Joined: 18 Dec 2006
Posts: 317
Location: Denmark

PostPosted: Fri Jan 25, 2008 3:16 pm   

[2.18] Filtering with #CAP and #GAG
 
You can set up a trigger to react on your own input and gag it if you like. I use this a lot when writing scripts as I try to reduce screen scrolling. However as nice it is not having to look at all the commands from my script it would be nice to be able to see what the command looked like when things go wrong and mud returns with an unexpected message. For this I have made a window and would like to capture the commands there with #CAP before gagging them. However, this doesn't quite work for me. Instead of capturing the command it will capture the last output from the mud before the command.

When executing a command I set up a temporary trigger that reacts on input and with the command itself as pattern. This works nicely and the alias filterJunk is called.
Code:
#TEMP {$command} {filterJunk} "" input

filterJunk alias:
Code:
#CAP Junk
#GAG

Does anyone know the solution to capture the input instead of the last line received from mud before input or is an option missing on the #CAP command?
Reply with quote
kjaerhus
Magician


Joined: 18 Dec 2006
Posts: 317
Location: Denmark

PostPosted: Sun Jan 27, 2008 11:02 pm   
 
No ideas at all? Sad
Reply with quote
Zhiroc
Adept


Joined: 04 Feb 2005
Posts: 246

PostPosted: Mon Jan 28, 2008 5:04 am   
 
I think you'll have to resort to having an ONINPUT trigger, and then using #WIN Junk {%trigger} to get the text into your window.
Reply with quote
kjaerhus
Magician


Joined: 18 Dec 2006
Posts: 317
Location: Denmark

PostPosted: Mon Jan 28, 2008 1:32 pm   
 
Well, if it works it's fine. I'll try it out.

...and it IS an input trigger by the way... :-)
Reply with quote
kjaerhus
Magician


Joined: 18 Dec 2006
Posts: 317
Location: Denmark

PostPosted: Mon Jan 28, 2008 6:21 pm   
 
Works great, Zhiroc. So instead of capturing it from the screen I simply write it in the other window myself. Things can be simple if you get the right idea from the start.

Thanks for your input. :-)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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