|
|
|
设计完以后 把窗口生成器生成的代码 复制到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