ScreenDump Function

Share your scripts and packages with other Mudlet users.
Post Reply
kaeus
Posts: 50
Joined: Thu Dec 31, 2009 4:33 pm

ScreenDump Function

Post 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
Attachments
ScreenDump (1).xml
(3.44 KiB) Downloaded 461 times

Michael
Posts: 9
Joined: Sun Jul 05, 2009 11:19 am

Re: ScreenDump Function

Post 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?

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: ScreenDump Function

Post by Vadi »

It doesn't do them yet, just needs to be coded in.

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: ScreenDump Function

Post by Vadi »

Fixed original so it doesn't break, seems invokeDialog messes up matches[] sometimes

Post Reply