 |
priit Beginner
Joined: 03 Feb 2004 Posts: 29 Location: Estonia
|
Posted: Thu Feb 12, 2004 11:43 am
capturing coloured stuff. |
how can I capture some coloured stuff with triggers?
#REGEX {([a-z ']+)$} {#VAR ruuminimi {%1}} "" {notrig|regex|line=2}
expect the WHOLE line being green and works perfectly in situations:
!# CSW>look
The Inn's Rooms
A large bulletin board, entitled "News", is mounted here.
Barliman Butterbur, the innkeeper, offers you a room in his inn.
A Guard of Bree stands here.
but when I spam and get something like:
*# CSW>Main Street
There is an old street-lamp on the border of the street.
Exits: north, [east], south.
then it doesnt work. and how to make it match only the green part without prompt? no I dont want to GAG prompt for that, any other solution? |
|
|
 |
TonDiening GURU

Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Fri Feb 13, 2004 12:43 am |
Not sure what the goop in your prompt is but usually
this is when something is suggested to push the
same line info onto the next line. Something like
#TRIGGER {^(?)(?) (%w)~>(%*)$} {#SH %expand(%4,1)} "" {color}
That should grab all the colors of what comes after the prompt and show it below the prompt. Might want to modify it against a prompt that doesn't have something after it if possible, might want to play with prompt/newline options.
Or if that is normally the only thing you get green
after the prompt is the room name, try and get the
right ansi codes and capture it on that line as well?
#TRIGGER {~>%e[1;32m(*)%e[0m$} {#VAR ruuminimi {%1}} "" {color} |
|
|
 |
|
|
|
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
|
|