找回密码
 加入
搜索
查看: 2700|回复: 2

[GUI管理] 麻烦帮我看下这段源码

  [复制链接]
发表于 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
 楼主| 发表于 2011-4-3 00:42:46 | 显示全部楼层
老大们,求助!
发表于 2011-4-3 16:56:49 | 显示全部楼层
提示: 该帖被管理员或版主屏蔽
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-11-15 07:16 , Processed in 0.092298 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表