 |
killergate Novice
Joined: 16 Feb 2009 Posts: 38
|
Posted: Tue May 04, 2010 12:33 pm
Capture ANSI line of text to another window |
Hi,
How can I capture a ANSI line of text into another window? Keeping the ANSI intact?
Example:
(blue)This is an ANSI (white)line. (yellow)This is an ANSI line. -> #window tells
AND
bonus question: Can I capture a line of text (triggering it non-ansi) and later grab the ansi-version of it?
/kg |
|
|
 |
Martaigne Wanderer
Joined: 05 Jan 2002 Posts: 88 Location: Atlanta, GA
|
Posted: Tue May 04, 2010 1:30 pm |
Won't #CAP do this?
|
|
|
 |
killergate Novice
Joined: 16 Feb 2009 Posts: 38
|
Posted: Tue May 04, 2010 1:41 pm |
Hi,
It indeed seems like it does that. Ill try.
/kg |
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Tue May 04, 2010 5:49 pm |
#CAPTURE will do so, but if you need to work with parts of the text pattern before sending off the result to the window you will need to use an ansi trigger. With local variables, you won't even have to worry about messing up your #WINDOW:
Code: |
#trigger {(pattern with ansi codes)} {
$plainpattern = %stripansi(%1)
$pattern = %1
#if ($plainpattern = "something") {#window windowname {$pattern}}
} |
|
|
_________________ EDIT: I didn't like my old signature |
|
|
 |
|
|