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
asm
Wanderer


Joined: 19 Jul 2004
Posts: 68

PostPosted: Mon Jun 04, 2007 12:12 am   

Timestamps in different windows.
 
Hello all,

I've been working on a script that captures channel output from a mud and redirects it to another window. While this portion works perfectly, I also wanted to give the messages timestamps. Here's the relevant code:

Code:
#win channels {%time( hh:mm:ss): }


Elsewhere in the script:

Code:
#CAPTURE channels


Now the problem with this is the #win adds a newline after the timestamp, giving output like this:

Quote:
16:52:52:
(Market): Alakardaiel says, "Got it, thank you."


Anyone know of a way to get it to format it more like this?:

Quote:
16:52:52: (Market): Alakardaiel says, "Got it, thank you."


Thanks
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Jun 04, 2007 2:37 am   
 
Stop using #CAPTURE. The trigger line would go straight into the #WINDOW command, but unlike #CAPTURE you have to do it manually like a #SUBSTITUTE.
_________________
EDIT: I didn't like my old signature
Reply with quote
asm
Wanderer


Joined: 19 Jul 2004
Posts: 68

PostPosted: Mon Jun 04, 2007 2:59 am   
 
Well, thing is, #capture keeps all of the color codes and such, while a manual relay through #win wipes all of that out...

And I'm not sure I'm following what you're suggesting, exactly...Could you explain a bit?
_________________
My collections of scripts.
Reply with quote
shalimar
GURU


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

PostPosted: Mon Jun 04, 2007 5:18 am   
 
Here is what you do:

Click on the child window you want to have a timestamp to give it focus.
Open the settings editor to triggers.
Make the following trigger:

#TR {^} {#SUB {%time(t)}}

Don't forget to save the childwindow afterwards under the settings menu.
_________________
Discord: Shalimarwildcat
Reply with quote
nkei0
Beginner


Joined: 08 Oct 2005
Posts: 19

PostPosted: Thu Jun 14, 2007 1:27 pm   
 
You could also always use %ansi and manually color the lines as you want them... It also makes it nice if you have a friendlist, you can color messages from people on your friendlist to a brighter color to show importance...
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