(New message)
Subject review (reverse sequence)
Posted by
Nick Gammon
Australia (18,772 posts) bio
Forum Administrator
Date
Thu 07 Oct 2004 10:00 PM (UTC) [ quote
]
Message
If the line does not exist it takes a default value - that is, "n" for flags, "" for strings, and 0 for numbers. Although in some cases it has other defaults (eg. the number of lines in your output buffer does not default to zero if you omit that line).
In fact, the script function GetDefaultValue tells you what the defaults are for various options.
- Nick Gammon
www.gammon.com.au, www.mushclient.com top
Posted by
Poromenos
Greece (1,037 posts) bio
Date
Thu 07 Oct 2004 10:48 AM (UTC) [ quote
]
Message
Oh, great! It works, thank god. I got a lot of abuses of this one, I thought that it was "y" for checked, "n" for unchecked and if the entire line didn't exist it was grayed. Thanks Nick :)
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! top
Posted by
Nick Gammon
Australia (18,772 posts) bio
Forum Administrator
Date
Thu 07 Oct 2004 07:17 AM (UTC) [ quote
] Amended on Thu 07 Oct 2004 07:19 AM (UTC) by Nick Gammon
Message
It works for me, it isn't a bug nor is it erratic. :)
Here is my output (I removed the script call and changed it to colour the line, to better see what it was doing).
Someone tells you 'list'
TRACE: Matched trigger "([A-Za-z]+) tells you \'list\'$"
Someone tells you 'list'
Note how it correctly matches the bold line. However the trigger is this:
<triggers>
<trigger
bold="y"
custom_colour="2"
enabled="y"
ignore_case="y"
match="([A-Za-z]+) tells you \'list\'$"
match_bold="y"
match_text_colour="y"
regexp="y"
sequence="100"
text_colour="15"
>
</trigger>
</triggers>
Not only do you need:
match_bold="y"
but also:
bold="y"
Taken together they mean this:
match_bold - is the bold attribute to be tested?
bold - what value are we testing for?
This is how we get the tri-state checkbox. You clearly can't have three values (checked, unchecked and gray) in a simple yes/no value.
If match_bold = "y" then it tests the bold attribute. If it is testing the bold attribute it compares it to the value in the "bold" = "x" line, where "x" is Y or N.
- Nick Gammon
www.gammon.com.au, www.mushclient.com top
Posted by
Poromenos
Greece (1,037 posts) bio
Date
Wed 06 Oct 2004 01:07 PM (UTC) [ quote
]
Message
OK, this is in a plugin, I used this to test:
\1B[1m\1B[37mSomeone tells you 'list'
\1B[0m\1B[37mSomeone tells you 'list'
The trigger is:
<trigger
enabled="y"
ignore_case="y"
keep_evaluating="n"
match="([A-Za-z]+) tells you \'list\'$"
match_bold="n"
match_text_colour="y"
regexp="y"
script="sbTellList"
sequence="100"
text_colour="15"
other_text_colour="black"
other_back_colour="black"
>
</trigger>
With match_bold="n":
Someone tells you 'list'
TRACE: Matched trigger "([A-Za-z]+) tells you \'list\'$"
TRACE: Executing trigger script "sbTellList"
Someone tells you 'list'
TRACE: Matched trigger "([A-Za-z]+) tells you \'list\'$"
TRACE: Executing trigger script "sbTellList"
The first tell is bold white, yet it matches on both.
With match_bold="y":
Someone tells you 'list'
Someone tells you 'list'
TRACE: Matched trigger "([A-Za-z]+) tells you \'list\'$"
TRACE: Executing trigger script "sbTellList"
The first one is the bold one, yet it only matches the second one. I can't explain this erratic behaviour...
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! top
Posted by
Nick Gammon
Australia (18,772 posts) bio
Forum Administrator
Date
Wed 06 Oct 2004 07:03 AM (UTC) [ quote
]
Message
I can't reproduce that.
If I set it to match on bold white, and send this with Shift+Ctrl+F12:
blah \1B[1m\1B[37m room \1B[0m blah
(matching the word "room")
This matches - bold white. It also doesn't match "room" in non-bold white (ie. gray).
- Nick Gammon
www.gammon.com.au, www.mushclient.com top
Posted by
Poromenos
Greece (1,037 posts) bio
Date
Wed 06 Oct 2004 12:25 AM (UTC) [ quote
]
Message
Yes, it's on (match_bold="y") and I want to match on bold white, but it matches on gray, so it's quite wrong... Looks like a bug.
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! top
Posted by
Flannel
USA (1,230 posts) bio
Date
Tue 05 Oct 2004 11:56 PM (UTC) [ quote
]
Message
Poromenos, you sure you have it "on" and not greyed?
And, are you sure youre using the right grey? (whether thats bold black, or normal white)
While we're on this subject, can we get a "Default" option for both?
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. top
Posted by
Poromenos
Greece (1,037 posts) bio
Date
Tue 05 Oct 2004 05:49 PM (UTC) [ quote
]
Message
I am trying to make a tell trigger and I don't want it to match on grey, but if i turn bold on it matches neither on white nor gray, while if I turn it off it matches on both. Bug?
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! top
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
1,291 views.
Reply to this subject
Start a new subject
  Refresh page
Go to topic:
(Choose topic)
Area Editor: Bug reports
Area Editor: General
Area Editor: News and updates
Area Editor: Suggestions
Area Editor: Tips and tricks
Dawn of Time: Administration
Dawn of Time: Configuration
Dawn of Time: Installing/compiling the server
Dawn of Time: New Dawn Muds Announcements
Dawn of Time: Playing
Dawn of Time: What is Dawn of Time (Dawn)?
Electronics: Microprocessors
Electronics: Operational Amplifiers
Forum: About
Forum: Announcements
Forum: Mailing other users
Forum: Problems
Forum: Registering
Forum: Searching
Forum: Subscribing
Forum: Suggestions
Forum: Test
Forum: Time zones / time display
Forum software: Administration
Forum software: Installation
MUDs: Announcements
MUDs: General
MUDs: MUD Design Concepts
MUSHclient: Announcements
MUSHclient: Beta testing
MUSHclient: Bug reports
MUSHclient: Development
MUSHclient: General
MUSHclient: Getting Started
MUSHclient: International
MUSHclient: Jscript
MUSHclient: Lua
MUSHclient: Miniwindows
MUSHclient: MXP and Pueblo
MUSHclient: Perlscript
MUSHclient: Plugins
MUSHclient: Python
MUSHclient: Suggestions
MUSHclient: Tips and tricks
MUSHclient: VBscript
MUSHclient: Wine
PennMUSH: Compiling the server
PennMUSH: Running the server
Programming: General
Programming: STL
Quilting: General
ROM: Compiling the server
ROM: Running the server
SMAUG: Commands
SMAUG: Compiling the server
SMAUG: Lua
SMAUG: Running the server
SMAUG: SMAUG coding
Search the forum
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )