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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Scirkhan
Apprentice


Joined: 14 Sep 2007
Posts: 167
Location: aztx

PostPosted: Tue Jun 01, 2010 1:20 pm   

Capturing Color codes to variable
 
#capture captures all the colors into another window.
My question is there a way to capture the line and it's colors to a variable?
This is how I would imagine it:
#variable line {%ansi(%line)}
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Tue Jun 01, 2010 2:28 pm   
 
Just make it an ANSI trigger.

Also you cannot use line so you need to do something like the following

#trigger {(*)} {#variable colorcap %1} {colorCap} {color}

The point being that if you want to capture the whole line you need to enclose your whole trigger in parenthesis.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Scirkhan
Apprentice


Joined: 14 Sep 2007
Posts: 167
Location: aztx

PostPosted: Wed Jun 02, 2010 2:01 am   
 
This awesome, but I am having trouble catching the whole line because it has commas in it.
(with color..)

Gold:[335.27k|335,722] : [422,720
becomes
Gold:[335.27k|335,
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Wed Jun 02, 2010 2:40 am   
 
%quote() is a wonderful thing
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Scirkhan
Apprentice


Joined: 14 Sep 2007
Posts: 167
Location: aztx

PostPosted: Wed Jun 02, 2010 8:06 am   
 
I looked at least ten times! I haven't even seen %quote() in years!
You are awesome. Thank you
Reply with quote
Scirkhan
Apprentice


Joined: 14 Sep 2007
Posts: 167
Location: aztx

PostPosted: Sun Aug 15, 2010 7:38 am   
 
I didn't mention this last time, but I wanted to now.
%quote doesn't capture everything correctly in this color setup i was trying to do. seems to have problems with certain characters.
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Sun Aug 15, 2010 11:20 pm   
 
Well, if you could give us some examples of the ones that do NOT work, a picture or preferably some code or both maybe someone can help more.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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