用au3编写网管维护工具图文教程

 

首先要先设计个维护面板 看














 





 

 

 

设计完以后 把窗口生成器生成的代码 复制到SCITE编辑器里  红色部分就是需要我们写上去的代码
在SCITE里新建一个脚本 然后复制进去
#include <GUIConstants.au3>
#include <Process.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("维护工具", 251, 81, 297, 252)
$Button1 = GUICtrlCreateButton("控制面版", 20, 8, 75, 25, 0)
$Button2 = GUICtrlCreateButton("显示属性", 20, 48, 75, 25, 0)
$Button3 = GUICtrlCreateButton("系统属性", 132, 8, 75, 25, 0)
$Button4 = GUICtrlCreateButton("进程管理", 132, 48, 75, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1
                        RunWait("c:\windows\system32\control.exe"); 打开控制面板
                       
                Case $Button2
                        _rundos("C:\windows\system32\desk.cpl");打开显示属性
                       
                Case $Button3
                        _RunDOS("c:\windows\system32\sysdm.cpl");打开系统属性
                       
                Case $Button4
                        RunWait("c:\windows\system32\taskmgr.exe");打开任务管理器
&

nbsp;                      
        EndSwitch
WEnd

 
 
申明:本站资源大部分来自网络,如果无意侵犯了你的权利,请及时通知我们 AutoIt@FoxMail.Com,我们将尽快处理
Copyright © 2008-2009 随便复制 共享精神 人人有责 All Right Reserved
粤ICP备08009024号