|
Draxtier Newbie
Joined: 13 Mar 2003 Posts: 9 Location: Canada
|
Posted: Thu Mar 13, 2003 2:10 am
Time stamping captured lines |
Can anyone suggest a simple way to include the time in a captured line while maintaining its colour?
Adding a simple trigger to my subwindow can do this but it removes all colour.
#TRIGGER {(*)} {#SUB %time("tt") %1}
blah |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Thu Mar 13, 2003 3:47 am |
Capture the color along with the rest of the text. Example:
#TRIGGER {&%*{line}} {#SUB {%time("tt") @line}}
Kjata |
|
|
|
Draxtier Newbie
Joined: 13 Mar 2003 Posts: 9 Location: Canada
|
Posted: Thu Mar 13, 2003 9:36 am |
There seem to be some problems with your solution. zMUD is only maintaining the last colour in a line of text and applying that colour to the final word in a line after removing the space.
With the trigger:
quote:
#TRIGGER {&%*{line}} {#SUB {%time("tt") @line}}
The mud sends:
Zugg gossips 'A very colourful line indeed'
And I see:
12:22:22 PM Zugg gossips 'A very colourful lineindeed'
blah |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Thu Mar 13, 2003 10:04 am |
And change the options on it to
[x] ANSI trigger
[ ] Trigger on trigger
Edited: removed the possible insecure trigger. |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Thu Mar 13, 2003 12:34 pm |
Yes, thanks Ton, I forgot the ANSI trigger option. Do enable that, but be sure to use my trigger instead. Ton's works fine too, but the pattern used in mine is the only way I have found to prevent abuse of the %* wildcard.
Kjata |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Mar 13, 2003 6:46 pm |
Alternate solution (untested) (tested)
#TR {*} {:test:#SHOWP {%time( tt)" "};#CAP test}
This works with offline simulation but still needs online verification.
Online verification complete. Worked flawlessly.
LightBulb
Advanced Member |
|
|
|
Draxtier Newbie
Joined: 13 Mar 2003 Posts: 9 Location: Canada
|
Posted: Thu Mar 13, 2003 8:27 pm |
Thanks guys. It's working just perfectly
|
|
|
|
Death Apprentice
Joined: 25 Jun 2002 Posts: 109 Location: USA
|
Posted: Fri Mar 14, 2003 3:11 am |
#TR {*} {:test:#SHOWP {%time( tt)" "};#CAP test}
#TR {(%w) -Gossips- '(*)'} {:Global News:#SHOWP {""};#CAP {Global News}}
That's what I wanted to turn that trigger into...just to be able to grab the text with no time stamp. Send it to the Global News window. It's not really working..it was sending "Global News:#SHOWP {}" Anything I'm doing wrong?
Also, how exactly do the :test: things work? What exactly is it establishing?
Thanks for any answers,
Death
-=Realms of the Forgotten=-
rotf.net:5000 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Mar 14, 2003 9:15 am |
:Global News: doesn't work because it has a space in it. Even though it's possible to use multi-word titles for windows, it's not a good idea. Use GlobalNews (or perhaps just News?) as the window name instead.
Since you just want to capture the line, just capture the line. No #SHOWP needed.
From the Introduction to Multiplaying helpfile:
To send commands to a different window, precede your command with name: where name is the name of the window you wish to get focus, and : is the focus character (which can be changed in the Preferences). The indicated window will be brought to the top and focused, and the command will be sent to that character. To send a command to a different window without changing the focus, precede your command with :name: where name is the name of the window you want to command sent to. In this case, your current window will be unchanged. If you do not specify any window name, and just enter :hi then hi will be sent to all windows.
The helpfiles are included for your benefit. A moment spent looking up #SHOWP to see what it does would have told you that #SHOWP {""} was pointless.
LightBulb
Advanced Member |
|
|
|
Death Apprentice
Joined: 25 Jun 2002 Posts: 109 Location: USA
|
Posted: Sat Mar 15, 2003 3:49 am |
Ok, since #showp is pointless, I changed it up a bit and it's not grabbing anything now...
#TR {^(%w) -Gossips- '(*)'} {:News:#CAP News}
I'm not sure if i'm doing anything wrong or not...maybe I am...I have it set as ANSI Trigger in it's options...hrmm
-Death
-=Realms of the Forgotten=-
site: www.rotf.net
connect: rotf.net:5000 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Mar 15, 2003 5:21 am |
#TR {^%w -Gossips- '*'} {#CAP News}
LightBulb
Advanced Member |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Mar 15, 2003 5:26 am |
You obviously missed the point of changing focus.
From the Introduction to Multiplaying helpfile:
To send commands to a different window, precede your command with name: where name is the name of the window you wish to get focus, and : is the focus character (which can be changed in the Preferences). The indicated window will be brought to the top and focused, and the command will be sent to that character. To send a command to a different window without changing the focus, precede your command with :name: where name is the name of the window you want to command sent to. In this case, your current window will be unchanged. If you do not specify any window name, and just enter :hi then hi will be sent to all windows.
But you don't want to send the COMMAND to a different window.
If you look back to the trigger you're trying to modify, you'll see that the #SHOWPROMPT command was sent to the other window by placing :test: before it, but the #CAPTURE command was NOT since :test: is NOT in front of it.
#TR {*} {:test:#SHOWP {%time( tt)" "};#CAP test}
I put this in a separate reply to avoid confusion.
LightBulb
Advanced Member |
|
|
|
Death Apprentice
Joined: 25 Jun 2002 Posts: 109 Location: USA
|
Posted: Sat Mar 15, 2003 3:33 pm |
Thanks LightBulb, I get it now.
-Death
-=Realms of the Forgotten=-
site: www.rotf.net
connect: rotf.net:5000 |
|
|
|
|
|