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
Fizgar
Magician


Joined: 07 Feb 2002
Posts: 333
Location: Central Virginia

PostPosted: Wed Sep 29, 2010 6:15 am   

Matching <ESC>[0m<CR><LF>
 
I'm trying to match
Code:
<ESC>[0m<CR><LF>
when it is sent from the mud. The following trigger isn't working and I'm not sure why I think it's correctly formatted. any suggestions? I'm using 3.29b. I'm also gonna Anchor at the start of the line but I guess I forgot that when I put the pattern together for this screenshot.


I've tried other methods of matching the blank line and they aren't meshing with what I'm trying to do. I believe this would be the most effective method but won't be sure till I get the pattern to match.
_________________
Windows Vista Home Premium SP2 32-bit
AMD Athlon Dual Core 4400+ 2.31 GHz
3 GB RAM
CMUD 3.34
Reply with quote
Fizgar
Magician


Joined: 07 Feb 2002
Posts: 333
Location: Central Virginia

PostPosted: Wed Sep 29, 2010 9:03 am   
 
I would still love to know how to do this if anyone has any ideas. I rewrote the scripts that would need this trigger and managed to get them to work with the within lines trigger type.
_________________
Windows Vista Home Premium SP2 32-bit
AMD Athlon Dual Core 4400+ 2.31 GHz
3 GB RAM
CMUD 3.34
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Wed Sep 29, 2010 12:26 pm   
 
Check whether you have a 0 or an O in your trigger pattern. That looks like the letter O to me, instead of the zero 0 it should be.

Also, try a different command than #BEEP. Perhaps the problem is that #BEEP isn't working for you.
Reply with quote
Fizgar
Magician


Joined: 07 Feb 2002
Posts: 333
Location: Central Virginia

PostPosted: Wed Sep 29, 2010 1:23 pm   
 
The 0 does kind of look like the letter o but is a zero in reality. Not sure why #beep wouldn't work but I swapped that out for a #show{} command and also tried getting it to assign a value to a test variable and neither of those worked either. This one has me baffled. The pattern should be spot on, it was created it with RegexBuddy.
_________________
Windows Vista Home Premium SP2 32-bit
AMD Athlon Dual Core 4400+ 2.31 GHz
3 GB RAM
CMUD 3.34
Reply with quote
Zugg
MASTER


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

PostPosted: Wed Sep 29, 2010 5:14 pm   
 
You cannot test \r\n directly. CMUD patterns always match within a line from the MUD. You need to turn on the "Trigger on Newline" option, then just have a pattern of ^$ to match a blank line (^ matches the beginning of the line, $ matches the end of the line).

The ESC[0m is something added by CMUD to the beginning of a line to reset the ANSI codes and is not actually sent from the MUD, so you don't match that either.

But the key is the "Trigger on Newline" option. One of the "Trigger on Newline" or the "Trigger on Prompt" options MUST be selected. If you have both turned off then your trigger will never fire.
Reply with quote
Moo
Apprentice


Joined: 10 Apr 2009
Posts: 145

PostPosted: Thu Sep 30, 2010 9:51 am   
 
Zugg wrote:
But the key is the "Trigger on Newline" option. One of the "Trigger on Newline" or the "Trigger on Prompt" options MUST be selected. If you have both turned off then your trigger will never fire.
Maybe the GUI could force that, then? Deselecting one could make the other active.
Reply with quote
Zugg
MASTER


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

PostPosted: Fri Oct 01, 2010 4:25 pm   
 
The problem is that having both options selected is still valid. So it's not quite an either/or situation.
Reply with quote
Moo
Apprentice


Joined: 10 Apr 2009
Posts: 145

PostPosted: Mon Oct 04, 2010 10:24 am   
 
Yes.. So, if you deselect one, and it was the only one selected, select the other. If it wasn't the only one selected, don't change anything.
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