| Message |
This is to do with the screen reader isn't it?
I have been thinking that there isn't really an easy way to capture every line that is typed in, displayed with world.note, and sent from the MUD.
Thus I have added an extra plugin callback into version 3.68 - OnPluginScreendraw.
This hooks into the "display line" routine, in such a way that it will capture input lines (things you type), note lines (from scripts) and also output lines that have not been gagged. This should work around your problem that your screen reader currently reads the lines that appear, even if they are about to be gagged.
A small plugin, like the one below, illustrates its use.
As for the COM side of it, as Shadowfyr suggests, you simply need to open the COM object (with CreateObject) early on, and store it in a variable outside any function.
You might create the COM object in OnPluginInstall.
The arguments to OnPluginScreendraw are:
type: type of line, where 0 = output line, 1 = note, 2 = command
log: are we planning to log it?
line: the text of the line itself
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Sunday, October 30, 2005, 3:29 PM -->
<!-- MuClient version 3.68 -->
<!-- Plugin "screendraw_test" generated by Plugin Wizard -->
<muclient>
<plugin
name="screendraw_test"
author="Nick Gammon"
id="9afd5521a287f53094d238ea"
language="Lua"
purpose="testing OnPluginScreendraw"
date_written="2005-10-30 15:27:42"
requires="3.68"
version="1.0"
>
</plugin>
<!-- Script -->
<script>
<![CDATA[
function OnPluginScreendraw (type, log, line)
AppendToNotepad ("test", type, " ", log, " ", line, "\r\n")
end -- function
]]>
</script>
</muclient>
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|