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.
 Entire forum ➜ MUSHclient ➜ General ➜ Trigger for incomplete line

Trigger for incomplete line

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


Posted by Hve   Germany  (11 posts)  Bio
Date Sat 11 Jun 2005 01:06 PM (UTC)
Message
Is it possible to make triggers match on incomplete lines?

What I mean is lines that are lacking a final newline.
My specific problem is a trigger that should disable certain timers when normal commands should not be entered, e.g. during editing a letter etc.
All is easily handled except
1) paused multiline output, identifyable by a line
"--MORE--" WITHOUT trailing newline
2) input or menu questions, looking like
"Selection [1,2,3,q,?] :" again WITHOUT trailing newline

The data is displayed in the output window but apparently won't be matched against triggers until it is completed with a newline...

Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #1 on Sat 11 Jun 2005 06:00 PM (UTC)
Message
You have two options, both of which have nice examples (and a couple of threads in the forum).

They'll both be using plugins, but you have your choice of OnPluginPartialLine, or OnPluginPacketReceived.

Partial line plugin:
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=3774

Packet plugin:
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=5020

Both methods have their plusses and minuses, and you can find many more threads about them for more examples (search for the callback, since it's nice and unique).

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
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.


12,647 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.