Register forum user name Search FAQ

Gammon Forum

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 ➜ Suggestions ➜ Automatically capture all mud output between two tags

Automatically capture all mud output between two tags

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Mendaloth   (14 posts)  Bio
Date Sat 14 May 2011 09:46 PM (UTC)
Message
I constantly find myself capturing between two tags. I don't think there is an easier way than creating three triggers. I wish there were.

Maybe I am missing something, but I have searched through the help files and forums and I can't find it.

Here is my example:
Say I want to capture and gag all text between {start_capture} and {end_capture}.

I need:
Trigger 1) A trigger that matches {start_capture}, and turns on trigger (2)
Trigger 2) A trigger that matches *
Trigger 3) A trigger that matches {end_capture}, and turns off trigger (2).

Do this 3 or 4 times in a plugin, and all of a sudden you have a ton of triggers that easily get confusing.

I would like to suggest that there be a function TagTriggerCapture (Crappy name) that takes the following options:

start_tag
omit_from_output y/n
match_between_tags (For me this would usually be *, but why not give the option of other matches)
script/function to the lines to
end_tag

BTW, I really love this client, and keep up the good work! This is just small issue, but figure I'd make the suggestion.




Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #1 on Sat 14 May 2011 10:28 PM (UTC)
Message
I'm not sure it should be part of MUSHclient itself, but you could create your own TagTriggerCapture() in Lua using AddTriggerEx().

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #2 on Sat 14 May 2011 11:59 PM (UTC)
Message
I agree it can be a bit of a pain, and there isn't really anything at present that does it.

As Twisol said, you could probably encapsulate the functionality with a bit of scripting. Instead of the usual process of enabling/disabling triggers a script could simply add, remove them in the appropriate sequence.

Someone could make a nice library that does that.

- 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.


14,059 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.