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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
RobAMacAF
Beginner


Joined: 24 Nov 2005
Posts: 19

PostPosted: Mon Mar 29, 2010 10:54 pm   

Sending info to a new window and coloring it
 
I am using

#WIN Chat %time(hh:mm:ss) You: %1
#CW $00FF00

To make a chat window. When it sends the text it is always an ugly teal color. I want to make it colored but the CW is firing on the main window, not the Chat window. Might anyone know how to make it trigger and color on the chat window?

Thanks
Rob
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Mon Mar 29, 2010 11:12 pm   
 
I think if you put the #CW before the #WIN, it will work.

Charneus
Reply with quote
RobAMacAF
Beginner


Joined: 24 Nov 2005
Posts: 19

PostPosted: Mon Mar 29, 2010 11:12 pm   
 
I had that as well. My full code was actually

#CW $00FF00
#WIN Chat %time(hh:mm:ss) You: %1
#CW $00FF00
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Mon Mar 29, 2010 11:34 pm   
 
You could make a trigger in the Chat window to color it for you.

Charneus
Reply with quote
RobAMacAF
Beginner


Joined: 24 Nov 2005
Posts: 19

PostPosted: Mon Mar 29, 2010 11:34 pm   
 
How do I go about making the trigger for that window? I did a search in the help documents and couldn't figure it out
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Mon Mar 29, 2010 11:59 pm   
 
Click on the Window name itself in Settings Editor, then select New->Trigger. The rest is up to you. :)

Charneus
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Mar 30, 2010 1:15 am   
 
You're using window and thus in control of the exact data being sent. Just color it in the #WINDOW command:

#window name {"<color #XXXXXX>"text"</color>"}
#window name {%ansi(X)text}
_________________
EDIT: I didn't like my old signature
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Tue Mar 30, 2010 2:09 am   
 
Hah. I had totally forgotten about that myself, Matt. Thanks for reminding me of that. :P

Charneus
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Mar 30, 2010 4:34 pm   
 
You don't need the extra quotes in that. Remember that the {} characters are like quotes, but allow variable and function expansion within them. So you don't typically need to mix {} with ". In any case, the following works just fine:

#WIN Chat {%time(hh:mm:ss) You: <color #00ff00>%1</color>}

and is definitely much more efficient than trying to use #CW.

Also, a note to the original poster: Did you know that each window can have it's own automatic timestamps? Click on the Chat window, then click the Prefs button in the toolbar. Click the Session tab on the left, then the Scrollback tab along the top. Enable the "Show timestamps" checkbox. Then click OK.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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