http://www.585soft.com/LCleaner.asp#
LCleaner是一款用于清除临时文件以及各种操作历史纪录的清理工具, 本来现在这种工具很多, 不足为奇.
但是LCleaner的查找引擎是基于lua scripts, 用户可以很容易地写新的脚本进行功能扩展。
脚本中必须定义以下4个函数, 以便LCleaner回调。
| GetPluginName | This function must return script name to display in list. |
| GetPluginIcon | This function must return system icon index for item in list. |
| GetSize | Application call this function to determine size and number of objects (for example files or registry keys). |
| Clear | Application call this function to clean (delete) objects. |
处理google ToolBar搜索纪录的例子:
function this.GetPluginName()
return "Google Tool Bar Search History";
end
function this.GetPluginIcon()
icon = this:GetIconIndex("%windir%//regedit.exe");
return icon;
end
function this.GetSize()
local size = 0;
count = this:RegKeyGetNumberOfValues("HKEY_CURRENT_USER//Software//Google//NavClient//1.1//History");
return size, count;
end
function this.Clear()
this:RegKeyDeleteValues("HKEY_CURRENT_USER//Software//Google//NavClient//1.1//History");
end
| Script for Recent Documents: | |
| function this.GetPluginName() return "Recent Documents"; end function this.GetPluginIcon() icon = this:icon = this:GetIconIndex("%RECENT%"); return icon; end function this.GetSize() local size = 0; count = this:GetFolderSize("%RECENT%", "", true); return size, count; end function this.Clear() this:DeleteFolderContent("%RECENT%", "", true); end |
本文介绍LCleaner这款清理工具及其脚本编写方法。LCleaner支持通过Lua脚本扩展清理功能,示例包括清除Google工具栏搜索记录及最近打开的文档等。

7275

被折叠的 条评论
为什么被折叠?



