|
asm Wanderer
Joined: 19 Jul 2004 Posts: 68
|
Posted: 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:
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 |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
|
asm Wanderer
Joined: 19 Jul 2004 Posts: 68
|
Posted: 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? |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: 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 |
|
|
|
nkei0 Beginner
Joined: 08 Oct 2005 Posts: 19
|
Posted: 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...
|
|
|
|
|
|