本帖最后由 lzlcn 于 2011-3-17 11:58 编辑
想制作一个清理系统垃圾工具但不会连接进度条,但怎么连接进度条呢。并在右下角提示处时时显示删除的内容最佳!#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 352, 120, 267, 300)
$Button1 = GUICtrlCreateButton("清理系统垃圾文件", 56, 16, 123, 33)
$Button2 = GUICtrlCreateButton("退出", 224, 16, 81, 33)
$Progress1 = GUICtrlCreateProgress(8, 72, 337, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $Button1
ToolTip(@CR & ' 正在清除系统垃圾,请稍候... ' & @CR, @DesktopWidth - 250, @DesktopHeight - 100)
RunWait(@ComSpec & " /c " & "del /f /s /q %systemdrive%\*.tmp &del /f /s /q %systemdrive%\*._mp &del /f /s /q %systemdrive%\*.log &del /f /s /q %systemdrive%\*.gid &del /f /s /q %systemdrive%\*.chk &del /f /s /q %systemdrive%\*.old &del /f /s /q %systemdrive%\recycled\*.* &del /f /s /q %windir%\*.bak &del /f /s /q %windir%\prefetch\*.* rd /s /q %windir%\temp md %windir%\temp &del /f /q %userprofile%\recent\*.* &del /f /s /q %userprofile%\Local Settings\Temporary Internet Files\*.* &del /f /s /q %userprofile%\Local Settings\Temp\*.* &del /f /s /q %userprofile%\recent\*.*", "", @SW_HIDE)
MsgBox(64, "提示", "清除完毕!", 5)
Case $GUI_EVENT_CLOSE
Exit
Case $Button2
Exit
EndSwitch
WEnd
|