#include <GUIConstantsEx.au3>
Opt('MustDeclareVars', 1)
Example()
Func Example()
Local $Button_1, $Button_2, $Button_3, $Button_4, $Button_5, $Button_6, $Button_7, $Button_8, $Button_9, $Button_10, $msg
GUICreate("电脑优化工具") ; will create a dialog box that when displayed is centered
Opt("GUICoordMode", 2)
$Button_1 = GUICtrlCreateButton("启动项优化", 30, 30, 100)
$Button_2 = GUICtrlCreateButton("注册表优化", 100,-1)
$Button_3 = GUICtrlCreateButton("服务项优化", -300,40)
$Button_4 = GUICtrlCreateButton("调整DMA", 100,-1)
$Button_5 = GUICtrlCreateButton("垃圾清理", -300,40)
$Button_6 = GUICtrlCreateButton("系统属性", 100,-1,100)
$Button_7 = GUICtrlCreateButton("虚拟内存", -300,40,100)
$Button_8 = GUICtrlCreateButton("启动时长", 100,-1,100)
$Button_9 = GUICtrlCreateButton("错误报告", -300,40,100)
$Button_10 = GUICtrlCreateButton("还原、更新", 100,-1,100)
GUISetState() ; will display an dialog box with 2 button
; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $Button_1
Run('.\qidong.exe')
WinWait("系统配置实用程序")
Send("{SHIFTDOWN}+{TAB}")
Send("{RIGHT 5}")
Case $msg = $Button_2
Run('.\xpregistry.exe')
Case $msg = $Button_3
Run('.\server.exe')
Case $msg = $Button_4
Run('.\shebei.exe')
Case $msg = $Button_5
Run('.\laji.bat')
Case $msg = $Button_6
Run('.\shuxing.bat')
Case $msg = $Button_7
Run('.\shuxing.bat')
WinWaitActive("系统属性","Microsoft Windows XP")
Send("{RIGHT 3}")
Send("!s")
Send("{SHIFTDOWN}+{TAB}")
Send("{RIGHT 1}")
Send("!c")
Case $msg = $Button_8
Run('.\shuxing.bat')
WinWaitActive("系统属性","Microsoft Windows XP")
Send("{RIGHT 3}")
Send("!t")
Case $msg = $Button_9
Run('.\shuxing.bat')
WinWaitActive("系统属性","Microsoft Windows XP")
Send("{RIGHT 3}")
Send("!r")
Case $msg = $Button_10
Run('.\shuxing.bat')
WinWaitActive("系统属性","Microsoft Windows XP")
Send("{RIGHT 4}")
EndSelect
WEnd
EndFunc