Redirect trace output to a notepad window

Posted by Nick Gammon on Thu 05 Feb 2009 03:35 AM — 2 posts, 13,836 views.

Australia Forum Administrator #0
This small plugin redirects trace output (from the Game menu -> Trace) to a notepad window, rather than the main output window.

This is particularly useful if you are debugging triggers which omit from output, as that will also omit the trace output from the output window.

Save between the lines as Trace_To_Notepad.xml and use File menu -> Plugins to load that file as a plugin.


<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Thursday, February 05, 2009, 3:33 PM -->
<!-- MuClient version 4.37 -->

<!-- Plugin "Trace_To_Notepad" generated by Plugin Wizard -->

<muclient>
<plugin
   name="Trace_To_Notepad"
   author="Nick Gammon"
   id="adf79802005a0d6186530bee"
   language="Lua"
   purpose="Redirects trace to a notepad window"
   date_written="2009-02-05 15:32:15"
   requires="3.67"
   version="1.0"
   >

</plugin>


<!--  Script  -->


<script>
<![CDATA[

function OnPluginTrace (line)
  AppendToNotepad ("Trace", line .. "\r\n")
end

]]>
</script>


</muclient>


Australia Forum Administrator #1
Also see http://www.gammon.com.au/forum/?id=9218 which shows how to do a similar thing to a miniwindow.