Page 1 of 1

ScreenDump Function

Posted: Sat Apr 24, 2010 7:25 pm
by kaeus
This function/alias will save the current buffer (what you see on the screen) to an html file with color formatting. This is useful if you wish to go over something in your system, but want the end result, instead of doing html logging on what the mud sends out initially.

You can either call logScreen(logdir, logfile) in lua or use the alias screendump <filename>. The alias is setup to ask you for a directory using a standard File Dialog so its easier to point it to get a directory other than Mudlet's home directory. Be warned, large buffers do take me around 2 minutes to fully save since for each line it has to process character by character.



Update: Fixed whitespace formatting and also to use a mono space font so formatting isn't messed up.

Thanks to Vadi for helping to improve the function a bit! The original thread can be found at: http://forums.mudlet.org/viewtopic.php?f=9&t=1410

Re: ScreenDump Function

Posted: Wed Apr 28, 2010 4:08 am
by Michael
This script has made my week.

One thing:
I notice background colours aren't being saved. Is this a quirk of html, or a bug with the logging?

Re: ScreenDump Function

Posted: Wed Apr 28, 2010 1:40 pm
by Vadi
It doesn't do them yet, just needs to be coded in.

Re: ScreenDump Function

Posted: Fri Aug 13, 2010 11:06 pm
by Vadi
Fixed original so it doesn't break, seems invokeDialog messes up matches[] sometimes