Line Highlight

Post Reply
User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Line Highlight

Post by tsuujin »

I'm completely stumped.

All I want to do is take a line and highlight it. I thought this was as simple as creating a new trigger with an "exact match" pattern, checking "highlight" and selecting the colors. So I tried it, and it failed.

Then, I tried doing the same thing but unselecting highlight and instead using selectString(line,1) fg("green") resetFormat()

This, too, failed.

I don't know where to go from here!

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MudletPackage>
<MudletPackage version="1.0">
    <TriggerPackage>
        <Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
            <name>Physical Balance</name>
            <script>selectString(line,1)
fg("green")
resetFormat()</script>
            <triggerType>0</triggerType>
            <conditonLineDelta>0</conditonLineDelta>
            <mStayOpen>0</mStayOpen>
            <mCommand></mCommand>
            <mFgColor>#ffff00</mFgColor>
            <mBgColor>#550000</mBgColor>
            <mSoundFile></mSoundFile>
            <colorTriggerFgColor>#000000</colorTriggerFgColor>
            <colorTriggerBgColor>#000000</colorTriggerBgColor>
            <regexCodeList>
                <string>^You have regained balance\.$</string>
                <string>Aku (male Tsurani Human)</string>
            </regexCodeList>
            <regexCodePropertyList>
                <integer>1</integer>
                <integer>3</integer>
            </regexCodePropertyList>
        </Trigger>
    </TriggerPackage>
</MudletPackage>

naftali
Posts: 138
Joined: Wed Jan 20, 2010 8:42 pm

Re: Line Highlight

Post by naftali »

mudlet version? Highlighting strings ending in "." was broken in one of the mudlet 1.0.6 pre releases

User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Re: Line Highlight

Post by tsuujin »

the linux installer for 1.0.6 version, which is displayed in the about page as "Mudlet 1.0.6 built: January 23, 2010".

Good to know. I changed the trigger to remove the line ending in "." and replaced it with one ending in ")", to the same results.

User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Re: Line Highlight

Post by tsuujin »

it should be noted that I'm using a target highlighter via temp trigger without problem.

Code: Select all

target = matches[2]
if tarHighlight then killTrigger(tarHighlight) end
tarHighlight = tempRegexTrigger(target, [[selectString("]] .. target .. [[", 1) fg("red") resetFormat()]])
echo("Target is now: "..target.."\n")

naftali
Posts: 138
Joined: Wed Jan 20, 2010 8:42 pm

Re: Line Highlight

Post by naftali »

try using a begin-of-line substring trigger that just doesn't have a "." at the end - don't replace it with anything

User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Re: Line Highlight

Post by tsuujin »

Ok, progress.

I can get a line to highlight, just so long as it ends with a alphanumeric character. ")" and "." both cause it to fail, as I've just confirmed.

Any workaround? Possibly a code update to a newer version of 1.0.6 code for linux?

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Line Highlight

Post by Heiko »

The currently available Linux code is really old now, Mac and windows snapshots are more recent, but still outdated.
New snapshots for all OS are coming up soon though.

Post Reply