Delphi03 Novice
Joined: 20 Aug 2004 Posts: 37 Location: Illinois
|
Posted: Sat Aug 21, 2004 1:56 am
Replacing Text |
Okay, so my MUD sends color via caret-color (^Y ^G ^R)...
As per suggestions of other forum members, I set up a class Color and set triggers to deal with the colors. This has led to many problems.
Originally Suggested Trigger:
Code: |
#TRIGGER {~^Y} {#SUB %ansi( High, Yellow)}
|
This caused the ^Y to disappear from the terminal, but no coloring of the line occurred.
My Modified Code:
Code: |
#TRIGGER {~^Y(*)} {#SUB {%ansi( High, Yellow)%1}}
|
This hid the ^Y from view, but caused the entire line to become yellow, regardless of following color codes sent from the server. Upon some checking, it appears that #SUBSTITUTE disables trigger checking within it's modified text.
ie:
Original: ^YThe Yellow ^GBasket ^Ywas full.
After-Trigger: The Yellow ^GBasket ^Ywas full.
Wanted: The Yellow Basket was full.
Can anyone tell me what to do to allow this to happen? |
|