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
yorcadon
Beginner


Joined: 11 Jun 2009
Posts: 16

PostPosted: Tue Jun 23, 2009 6:52 am   

Line color for triggers more than one line long.
 
So I'm trying count how many times something shows up. I'm using a string list to trigger off of, and if I do something like ^({@string}) it works fine.

Once I add in the Line Color check, it only works when a line fits across my screen in a single line, if it has to wrap around to another line it doesn't trigger.

I've tried everything I can think of. I changed it to ^({@string})*.$ to try to force it to see the end of the line, but I'm not even sure if that's the problem since the trigger pattern would only be for the first word.

Not sure if it makes a difference, but I used this in zmud just fine. I know cmud uses colors differently, I'm hoping not so differently that this is no longer possible.

Thanks in advance.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Wed Jun 24, 2009 11:06 pm   
 
Do you need to anchor to the beginning of the line, and do you need to check line color? My guess is that once you turn line color on, it is checking the ansi colors, and those ansi codes come before the first word.

An alternative would be to use an actual ansi trigger, and put the proper ansi code into your trigger pattern. Or if you don't need to anchor to the first word, then just get rid of the carat (^) in your trigger.
Reply with quote
yorcadon
Beginner


Joined: 11 Jun 2009
Posts: 16

PostPosted: Thu Jun 25, 2009 6:23 am   
 
It is necessary to force it to start at the beginning of the line. How would I force it to recognize an ansi pattern? Using %linecol? I'd rather not do that, but I can if that's the only way.
Reply with quote
yorcadon
Beginner


Joined: 11 Jun 2009
Posts: 16

PostPosted: Sat Jun 27, 2009 4:27 am   
 
Anyone have any ideas? I tried removing the ^. Tried checking for the ANSI code in the debugger, and it didn't give any ansi code for the colored text I need.

It appears to be more of a word problem. If I have it not wrap lines around, then it always works fine, but then the text just rolls right off the side of cmud, and I don't want to have to scroll back and forth!
It's when the line has to get wrapped to a second line that it doesn't fire. Removing the indent doesn't work either.

I'm at a loss!
Reply with quote
Arde
Enchanter


Joined: 09 Sep 2007
Posts: 605

PostPosted: Sat Jun 27, 2009 4:43 pm   
 
Well, I'm using CMUD 3.08 and while I can't see any problems with matching a keyword on a wrapped line, I do see the bug that CMUD ignores "Line Color" checkbox state. It looks only at line color selected with the color picker left to the checkbox.
_________________
My personal bug|wish list:
-Wrong Priority when copy-paste setting
-1 prompt trigger for Mapper, Session and General Options, not 3 different!
-#SECTION can terminate threads
-Buttons can't start threads
Reply with quote
yorcadon
Beginner


Joined: 11 Jun 2009
Posts: 16

PostPosted: Mon Jul 06, 2009 7:53 am   
 
I'll ask one more time to see if anyone else has any suggestions. I have colored text. I am using the line color option in a trigger.

I know it's detecting line color and that I have the right color selected because once I enable the line color check it starts only firing on lines of that color.
Problem is it stops firing on any wrapped lines. Again if I go to the options and disable word wrapping, this problem goes away.
It fires on wrapped lines fine without the color check too.

Last time I'm asking. If anyone has any ideas at all on this, please let me know.
Reply with quote
wrym
Magician


Joined: 06 Jul 2007
Posts: 349
Location: The big palace, My own lil world

PostPosted: Mon Jul 06, 2009 4:11 pm   
 
Are you using server side line wrap, or cmud line wrap?

Either way I think this might be hard to do, if I recall right this has been brought up before, I think what is happening is cmud sees

Code:
<ansi color pattern>text<ansi color reset><newline>
<same ansi color pattern>remaining text<ansi color reset>


Have you tried using an ANSI trigger, and just putting the color sequence at the beginning of the line?
_________________
"To the engineer, all matter in the universe can be placed into one of two categories: (1) things that need to be fixed, and (2) things that will need to be fixed after you've had a few minutes to play with them" - Scott Adams, The Dilbert Principle
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