#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=d:\zgk_2010\artical\software\form1.kxf
Global $Title="Windows系统管理工具"
If WinExists($Title) Then Exit
AutoItWinSetTitle($Title)
Dim $Checkbox[18]
$Form1_1 = GUICreate("Form1", 444, 409, 278, 153)
$Tab1 = GUICtrlCreateTab(0, 40, 441, 353)
$TabSheet1 = GUICtrlCreateTabItem("清理相关")
$Group1 = GUICtrlCreateGroup("清理垃圾", 8, 88, 425, 97)
$Checkbox[1] = GUICtrlCreateCheckbox("系统临时文件夹", 16, 112, 105, 17)
$Checkbox[2]= GUICtrlCreateCheckbox("用户临时文件夹", 128, 112, 105, 17)
$Checkbox[3] = GUICtrlCreateCheckbox("系统更新补丁后留下的文件", 248, 112, 169, 17)
$Checkbox[4] = GUICtrlCreateCheckbox("日志文件", 16, 136, 97, 17)
$Checkbox[5] = GUICtrlCreateCheckbox("清空回收站", 128, 136, 105, 17)
$Checkbox[6] = GUICtrlCreateCheckbox("Windows预读取文件", 248, 136, 145, 17)
$Checkbox[7] = GUICtrlCreateCheckbox("DllCache文件夹", 16, 160, 97, 17)
$Checkbox[8] = GUICtrlCreateCheckbox("缩略图缓存文件", 128, 160, 105, 17)
$Checkbox[9] = GUICtrlCreateCheckbox("清除.tmp等类型文件", 248, 160, 137, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("清理系统痕迹", 8, 192, 201, 97)
$Checkbox[10] = GUICtrlCreateCheckbox("运行记录", 16, 216, 129, 17)
$Checkbox[11] = GUICtrlCreateCheckbox("最近打开文档", 16, 240, 97, 17)
$Checkbox[12] = GUICtrlCreateCheckbox("Windows搜索记录", 16, 264, 137, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("全选", 16, 304, 81, 25)
$Button2 = GUICtrlCreateButton("全消", 120, 304, 81, 25)
$Button3 = GUICtrlCreateButton("执行清理", 344, 304, 81, 25)
$Group3 = GUICtrlCreateGroup("清理上网痕迹", 224, 192, 209, 97)
$Checkbox[13] = GUICtrlCreateCheckbox("IE缓存", 232, 216, 81, 17)
$Checkbox[14] = GUICtrlCreateCheckbox("IE历史", 320, 216, 97, 17)
$Checkbox[15] = GUICtrlCreateCheckbox("IE Cookies", 232, 248, 81, 17)
;$Checkbox[16] = GUICtrlCreateCheckbox("网络电影缓存", 340, 248, 97, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Label1 = GUICtrlCreateLabel("提示:", 16, 344, 31, 17)
$Label2 = GUICtrlCreateLabel("具体提示内容", 48, 344, 76, 17)
$TabSheet2 = GUICtrlCreateTabItem("故障修复")
$TabSheet3 = GUICtrlCreateTabItem("软件安装")
$TabSheet4 = GUICtrlCreateTabItem("安全播报")
$TabSheet5 = GUICtrlCreateTabItem("关机")
$TabSheet6 = GUICtrlCreateTabItem("TabSheet6")
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
;判断清理前各磁盘分区的空闲空间
Local $Disk=DriveGetDrive("Fixed");获得硬盘所有分区
Local $Free=0,$Total=0
If Not @error Then
For $i=1 To $Disk[0];遍历每个分区的自由空间
$Free=DriveSpaceFree($Disk[$i]&"")
$Total=$Total+$Free
Next
EndIf
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
For $i=1 To 16
GUICtrlSetState($Checkbox[$i],$GUI_CHECKED)
Next
Case $Button2
For $i=1 To 16
GUICtrlSetState($Checkbox[$i],$GUI_UNCHECKED)
Sleep(3000)
Next
EndSwitch
WEnd