|
towel Beginner
Joined: 27 May 2002 Posts: 13
|
Posted: Sat Oct 31, 2009 2:25 pm
Which # command shall I use? |
I am trying to change an entry..such as this:
Ettan leaves down.
how do I make that show
Ettan leaves D O W N. in #CW 2 ?
or
Ettan has arrived from above.
Ettan has arrived from A B O V E. in #CW 2 ?
thanks |
|
_________________ towel |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Oct 31, 2009 7:22 pm |
There are two ways you can do it.
1)use the #SUBSTITUTE command. It replaces the entire line, even if the pattern you match is not the entire line.
#trigger {^Ettan leaves down.$} {#sub %concat(%ansi(2),"Ettan leaves D O W N.")}
2)use the #PSUB command. It only replaces the parts of the line you tell it to, kind of like the relationship between #COLOR and #CW. #PSUB allows you to specify either a starting and ending character position (X and Y), or you can use the %x1...%99 variables to refer to variable parts of your pattern.
#trigger {^Ettan leaves (down).$} {#PSUB %concat(%ansi(2),"D O W N") %x1} |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Sat Oct 31, 2009 10:13 pm |
#SUB doesn't do the entire line. It just does the part that matches the trigger.
I think it'd be better to use #PSUB, though.
If I were at my computer, I would give you another option to take. But sadly, nowhere near it right now.
Charneus |
|
|
|
|
|