Trigger for incomplete line

Posted by Hve on Sat 11 Jun 2005 01:06 PM — 2 posts, 16,349 views.

Germany #0
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...

USA #1
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).