|
Mathian Newbie
Joined: 30 Apr 2004 Posts: 9 Location: Australia
|
Posted: Fri Apr 30, 2004 3:49 am
Yet another multiline thing |
I am new to zmud and have been trying to create a trigger to catch names from a list. I figured that it would be easy enough. I looked at the help file for multi-line capture and low and behold I find something WAY out of my league.
All I want to do is capture a name to a variable and create a trigger that colors that name. Here is an example of the list:
Code: |
<font color="blue">3220h, 3020m exb-</font id="blue"><font color="red">es cyrene</font id="red">
<font color="green">
Current event: Free-For-All
Player Location
-------------------------------------------------------------------------
Laurus Sharp curve in a rocky cavern
Tamlo Mountainside descending onto clouds
Peggy Mountainside descending onto clouds
Gilorn Statue of Sarapis upon the Pantheon
</font id="green">
<font color="blue">3220h, 3020m exb-</font id="blue"> |
Below is how I am attempting to do it, someone told me it could be done using States but I just end up with infinite loops trying that.
The triggers that I have created are:
#TR {-------------------------} {#T+ LISTCAP}
#CLASS LISTCAP
#TR {^(%w) *} {#addi hitlist %1;#cw (%1) {~@ecol}}
#CLASS 0
#TR {(%n)h,(%n)m (&w)-} {#T- LISTCAP}
(n.b. @ecol is the variable that conatins the color name, this makes changing the color much easier for me due to it not being coded in.)
I have tried this but I end up with it capturing this to the string in @hitlist:
Current|Player|Tamlo|Peggy|Gilorn
Help is greatly appreciated.
Perhaps Zugg could work on a help file for this sort of thing that is a bit simpler to understand. I read through the forum for multi-line capture stuff and there is a lot of it.
Thanks in advance to the person that takes pity on me the newbie! :) |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Fri Apr 30, 2004 5:11 am |
#TR {-------------------------} {#T+ LISTCAP}
#CLASS LISTCAP
#TR {^(%w) *} {#addi hitlist %1}
#CLASS 0
#TR {(%n)h,(%n)m (&w)-} {#T- LISTCAP}
#T- LISTCAP
#TR {{@hitlist}} {#COLOR @ecol} |
|
|
|
Mathian Newbie
Joined: 30 Apr 2004 Posts: 9 Location: Australia
|
Posted: Fri Apr 30, 2004 8:43 am |
Nope, your scripting doent work, I did it both cut and paste and Imprt and what I get is the capture works but it doesnt ever close so everything after that becomes magenta. Ia msure it can be multistate triigered but I havent for the foggiest got any idea how.
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Apr 30, 2004 10:09 am |
#TR {-------------------------} {#VAR hitlist {};#T+ LISTCAP}
#TR {{@hitlist}} {#CW @ecol}
#CLASS LISTCAP disable
#TR {^(%w)} {#ADDI hitlist %1}
#TR {^%d} {#T- LISTCAP} {} {prompt}
#CLASS 0 |
|
|
|
|
|