meekly 发表于 2011-4-2 22:04:07

麻烦帮我看下这段源码

运行源码后有时不能正常退出,另外如果文件设置为缩略图的话,退出后就没有文件名,就一图标,还有运行后SHIFT键就一直处于按下状态,需要按一下shift才能正常使用电脑。谢谢!#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

meekly 发表于 2011-4-3 00:42:46

老大们,求助!

lxz 发表于 2011-4-3 16:56:49

页: [1]
查看完整版本: 麻烦帮我看下这段源码