- Code:
#NoTrayIcon
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Process.au3>
#Region ### START Koda GUI section ### Form=TempDelete.kxf
$Form1 = GUICreate("TempDelete 1.0", 407, 91, -1, -1, $WS_POPUP, 0)
$Label1 = GUICtrlCreateLabel("กำลังลบไฟล์ Temporary...", 8, 8, 389, 23, $SS_CENTER)
GUICtrlSetFont(-1, 12, 800, 0, "Tahoma")
GUICtrlSetColor(-1, 0x0000FF)
$Label2 = GUICtrlCreateLabel("copyright freeware license 2011 By Admin_MyPrograms", 8, 72, 263, 17)
$Label3 = GUICtrlCreateLabel("(arm_2468@hotmail.com)", 272, 72, 125, 17)
$Label4 = GUICtrlCreateLabel("X", 392, 0, 13, 20, $SS_CENTER)
GUICtrlSetFont(-1, 10, 800, 0, "Tahoma")
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlSetTip(-1, "คลิกที่นี่ เพื่อออกจากโปรแกรม")
GUICtrlSetCursor (-1, 0)
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Form1, "int", 1000, "long", 0x00080000)
WinSetTrans($Form1, "", 200)
$Progress1 = GUICtrlCreateProgress(0, 41, 406, 19, $PBS_SMOOTH)
GUICtrlSetColor(-1, 0xFAF116)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Delete()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Label4
Exit
EndSwitch
WEnd
Func Delete()
For $i = 1 To 100
GUICtrlSetData($Progress1, $i)
If $i = 10 Then
_RunDOS("DEL ""%temp%"" /S /Q /A /F")
DirRemove("%temp%", 1)
EndIf
If $i = 27 Then
GUICtrlSetData($Label1,"กำลังลบไฟล์ Recent...")
_RunDOS("DEL ""%userprofile%\Recent"" /S /Q /A /F")
DirRemove("%userprofile%\Recent", 1)
EndIf
If $i = 48 Then
GUICtrlSetData($Label1,"กำลังลบไฟล์ Cookies...")
_RunDOS("DEL ""%userprofile%\Cookies"" /S /Q /A /F")
DirRemove("%userprofile%\Cookies", 1)
EndIf
If $i = 60 Then
GUICtrlSetData($Label1,"กำลังลบไฟล์ History...", 1)
_RunDOS("DEL ""%userprofile%\Local Settings\History"" /S /Q /A /F")
DirRemove("%userprofile%\Local Settings\History", 1)
EndIf
If $i = 75 Then
GUICtrlSetData($Label1,"กำลังลบไฟล์ Internet Temporary Files...")
_RunDOS("DEL ""%userprofile%\Local Settings\Temporary Internet Files"" /S /Q /A /F")
DirRemove("%userprofile%\Local Settings\Temporary Internet Files\", 1)
EndIf
If $i = 87 Then
GUICtrlSetData($Label1,"กำลังลบไฟล์ Temp ของ Windows...")
_RunDOS("DEL ""%windir%/temp"" /S /Q /A /F")
DirRemove("%windir%/temp", 1)
EndIf
If @MDAY = 30 Then
If $i = 92 Then
GUICtrlSetData($Label1,"กำลังลบไฟล์ Prefetch... (ลบทุกๆวันที่ 30 ของเดือน)")
_RunDOS("DEL ""%windir%/Prefetch"" /S /Q /A /F")
DirRemove("%windir%/Prefetch", 1)
EndIf
EndIf
If $i = 95 Then WinSetTrans($Form1, "", 170)
If $i = 96 Then WinSetTrans($Form1, "", 140)
If $i = 97 Then WinSetTrans($Form1, "", 110)
If $i = 98 Then WinSetTrans($Form1, "", 80)
If $i = 99 Then WinSetTrans($Form1, "", 50)
If $i = 100 Then WinSetTrans($Form1, "", 20)
Sleep(50)
Next
Exit
EndFunc
1.ทำไมเวลากด $Label4 มันไม่ยอมปิดอ่ะครับ
2.อยากให้กดปุ่ม $Label3 ใช้คำสั่งส่งอีเมลครับ (mailto:)
ช่วยตอบหน่อยครับ