Reply to this subject
Start a new subject
 
Refresh page
Pages: 1
2
| Posted by |
Digs
USA (17 posts) bio
|
| Date |
Reply #15 on Thu 14 Jun 2012 12:22 AM (UTC) [ quote
] |
| Message |
Success! Thanks for the help.
This plugin omits extra blank lines from the output window (excluding blank lines generated from notes). For instance, if there are 3 blank lines in a row, it will remove 2 of them.
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Tuesday, June 12, 2012, 9:29 AM -->
<!-- MuClient version 4.81 -->
<!-- Plugin "Omit_Extra_Blank_Lines" generated by Plugin Wizard -->
<muclient>
<plugin
name="Omit_Extra_Blank_Lines"
author="Digs"
id="9742160fe2a5ccb8e35478f1"
language="Lua"
purpose="Omits extra blank lines from output."
date_written="2012-06-12 09:29:45"
version="1.1"
>
<description trim="y">
<![CDATA[
Omits extra blank lines from output.
For example, given 3 blank lines in a row, 2 will be deleted.
]]>
</description>
</plugin>
<triggers>
<trigger
enabled="n"
match="^$"
name="omit_blank"
omit_from_output="y"
regexp="y"
sequence="1"
>
</trigger>
</triggers>
<script>
<![CDATA[
function OnPluginScreendraw (type, log, line)
if line == "" then
EnableTrigger("omit_blank", true)
else
EnableTrigger("omit_blank", false)
end
end
]]>
</script>
</muclient>
| top |
|
| Posted by |
Worstje
Netherlands (867 posts) bio
|
| Date |
Reply #16 on Thu 14 Jun 2012 11:02 AM (UTC) [ quote
] |
| Message |
| Nice. I hadn't even considered OnPluginScreenDraw. However, what does that behave like when you scroll up and down, pgup, pgdown and so forth? | top |
|
| Posted by |
Digs
USA (17 posts) bio
|
| Date |
Reply #17 on Thu 14 Jun 2012 05:16 PM (UTC) [ quote
] |
| Message |
Performance is great - no issues.
The OnPluginScreenDraw callback is in the same line processing chain as OnPluginLineReceived and trigger matching (see http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=6554). It has an added performance benefit because it's only called once per visible line (including notes and commands), unlike OnPluginLineReceived and triggers which process every incoming line.
It does appear that OnPluginScreenDraw is called too late to do anything with the current line, but it works just fine to enable a line-omitting trigger for the following line. ;-) | 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,097 views.
This is page 2, subject is 2 pages long:
1
2
Reply to this subject
Start a new subject
 
Refresh page
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )