Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ VBscript
➜ "Keep evaluating", and multi and single line triggers
"Keep evaluating", and multi and single line triggers
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Wink
(16 posts) Bio
|
Date
| Sun 06 Mar 2005 07:31 AM (UTC) |
Message
| I seem to be encountering a snag concerning the "keep evaluating" option and two triggers.
Here's the output:
My friend, clearly you know little of the sultry tango, if you think that you
can perform it without a partner.
I have a multiline trigger that responds to the full two lines of output:
My friend\, clearly you know little of the sultry tango\, if you think that you \ncan perform it without a partner\.\Z
As well as a single line trigger that responds to only the second line of output:
^can perform it without a partner\.$
Both triggers are set to "keep evaluating", but that's where I run into my dilemma. My single line trigger will only fire if I set it at a lower sequence number than the multiline trigger. So the execution ends up being single line trigger, multiline trigger.
My questions is this: Is it possible to make the multiline trigger fire first, and have the single line trigger fire second?
I believe I can work around this using an enabling/disabling system for the trigger for both lines of output, but I'm wondering if there's another method that I'm missing. Thanks for any response. | Top |
|
Posted by
| Scypio
Poland (50 posts) Bio
|
Date
| Reply #1 on Sun 06 Mar 2005 04:31 PM (UTC) |
Message
| What comes to my mind is something along the lines of: make a multiline trigger matching ^(.*)\ncan perform it without a partner\.
When the trigger fires, you would use a script to check whether the first line matches "My friend..." and do the desired action basing on the check's result. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #2 on Wed 23 Mar 2005 08:49 PM (UTC) |
Message
| There is a test in the code for MUSHclient that suppresses "keep evaluating" for multi-line triggers.
It is easy enough to remove, and unfortunately there is no comment on it to remind me why I put it there.
It is either there for a good reason, or is simply a mistake. Can anyone think of a reason why "keep evaluating" might be a bad idea for multi-line triggers? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Wink
(16 posts) Bio
|
Date
| Reply #3 on Sat 26 Mar 2005 06:34 AM (UTC) Amended on Sat 26 Mar 2005 06:36 AM (UTC) by Wink
|
Message
| Thanks for the suggestion, Scypio, but the actual problem here was what I thought my requirements were.
I was actually in the process of trying to build your suggestion, when I realized that I was being rather foolish about all this. Basically my requirements were less elaborate than I'd managed to convince myself previously, and all that I had to do was take the commands to be executed on the single line trigger, copy them, and add them to the multi-line trigger to occur after the original multi-line trigger commands (if any of that sentence makes sense). So whether or not the multi-line trigger managed to suppress the single line trigger, one way or another the commands would get executed in the order I wanted. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #4 on Fri 20 Jan 2006 05:24 AM (UTC) |
Message
| This has arisen again, so in version 3.73 the test has been removed. Hopefully there won't be side-effects. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | 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.
15,687 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top