找回密码
 加入
搜索
查看: 1272|回复: 0

新手的问题

[复制链接]
发表于 2009-7-31 18:19:37 | 显示全部楼层 |阅读模式
今天开始学AU3
看到论坛上的初级教程 自己也制作了一个
但是运行后反应很慢 而且很多按钮无响应 程序假死 请各位高手指点一二~



#include <ButtonConstants.au3>
#include <Process.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 631, 427, 213, 114)
GUISetFont(5, 400, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("系统属性", 40, 72, 129, 41, $WS_GROUP)
$Button2 = GUICtrlCreateButton("系统日志", 40, 128, 131, 41, $WS_GROUP)
$Button3 = GUICtrlCreateButton("磁盘管理", 40, 248, 131, 41, $WS_GROUP)
$Button4 = GUICtrlCreateButton("系统服务", 40, 192, 131, 41, $WS_GROUP)
$Button5 = GUICtrlCreateButton("任务管理器", 224, 248, 161, 41, $WS_GROUP)
$Button6 = GUICtrlCreateButton("控制面板", 224, 72, 161, 41, $WS_GROUP)
$Button7 = GUICtrlCreateButton("本地策略", 40, 304, 129, 41, $WS_GROUP)
$Button8 = GUICtrlCreateButton("计划任务", 224, 192, 161, 41, $WS_GROUP)
$Button9 = GUICtrlCreateButton("添加删除程序", 224, 128, 161, 41, $WS_GROUP)
$Button10 = GUICtrlCreateButton("启动winbox", 440, 72, 153, 41, $WS_GROUP)
$Button11 = GUICtrlCreateButton("CMD命令窗口", 440, 304, 153, 41, $WS_GROUP)
$Button12 = GUICtrlCreateButton("自动登陆", 224, 304, 161, 41, $WS_GROUP)
$Button13 = GUICtrlCreateButton("音量大小", 440, 192, 153, 41, $WS_GROUP)
$Button14 = GUICtrlCreateButton("注册表", 440, 128, 153, 41, $WS_GROUP)
$Button15 = GUICtrlCreateButton("启动项管理", 440, 248, 153, 41, $WS_GROUP)
$Input1 = GUICtrlCreateInput("", 56, 368, 161, 21)
$Button16 = GUICtrlCreateButton("运行", 232, 360, 105, 33, $WS_GROUP)
$Button17 = GUICtrlCreateButton("日期时间", 352, 360, 65, 33, $WS_GROUP)
$Button18 = GUICtrlCreateButton("关机", 432, 360, 49, 33, $WS_GROUP)
$Button19 = GUICtrlCreateButton("重启", 488, 360, 57, 33, $WS_GROUP)
$Button20 = GUICtrlCreateButton("注销", 560, 360, 57, 33, $WS_GROUP)
$Label1 = GUICtrlCreateLabel("123456", 368, 400, 226, 17)
GUICtrlSetColor(-1, 0xFF0000)
$Icon1 = GUICtrlCreateIcon("C:\WINDOWS\system32\SHELL32.dll", -44, 96, 8, 48, 48, BitOR($SS_NOTIFY,$WS_GROUP))
$Icon2 = GUICtrlCreateIcon("C:\WINDOWS\system32\SHELL32.dll", -44, 456, 8, 48, 48, BitOR($SS_NOTIFY,$WS_GROUP))
$Label2 = GUICtrlCreateLabel("系统工具集合", 176, 8, 250, 59)
GUICtrlSetFont(-1, 30, 800, 0, "Palatino Linotype")
GUICtrlSetColor(-1, 0xFF0000)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
  Case $Button1
                         Run(@SystemDir &"\rundll32.exe   shell32.dll,Control_RunDLL   SYSDM.CPL")
  Case $Button2
                         Run(@SystemDir &"\Eventvwr.msc")
    Case $Button2
                         Run(@SystemDir &"\Eventvwr.msc")
                           Case $Button3
                         Run(@SystemDir &"\diskmgmt.msc")
                           Case $Button4
                         Run(@SystemDir &"\services.msc")
                           Case $Button5
                         Run(@SystemDir &"\taskmgr.exe")
                           Case $Button6
                         Run(@SystemDir &"\control")
                           Case $Button7
                         Run(@SystemDir &"\secpol.msc")
                           Case $Button8
                         Run(@SystemDir &"\tasks")
                           Case $Button9
                         Run(@SystemDir &"\rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,3 ")
                           Case $Button10
                         Run(@SystemDir &"\Eventvwr.msc")
                           Case $Button11
                        Run(@SystemDir &"\cmd.exe")
                           Case $Button12
                         _RunDOS(@SystemDir &"\control userpasswords2")
                           Case $Button13
                         Run(@SystemDir &"\Sndvol32")
                           Case $Button14
                         Run(@SystemDir &"\regedit")
                           Case $Button15
                         Run(@SystemDir &"\msconfig")
                           Case $Button16
                         _RunDOS(@ComSpec &" /c "&GUICtrlRead($input1));
                           Case $Button17
                         Run(@SystemDir &"\timedate.cpl")
                           Case $Button18
                         Run(@SystemDir &"\shutdown.exe -s -t 10 -f")
                           Case $Button19
                         Run(@SystemDir &"\shutdown.exe -r -t 10 -f")
                           Case $Button20
                         Run(@SystemDir &"\logoff")
                         

                Case $Input1
        EndSwitch
WEnd
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-11-15 19:58 , Processed in 0.187276 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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