#include <GUIConstants.au3>
#include <Process.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("维护工具-小王", 315, 204, 278, 206)
$Button1 = GUICtrlCreateButton("系统属性", 8, 8, 75, 25, 0)
$Button2 = GUICtrlCreateButton("显示属性", 8, 56, 75, 25, 0)
$Button3 = GUICtrlCreateButton("进程管理", 8, 104, 75, 25, 0)
$Button4 = GUICtrlCreateButton("控制面板", 112, 8, 75, 25, 0)
$Button5 = GUICtrlCreateButton("命令行", 112, 56, 75, 25, 0)
$Button6 = GUICtrlCreateButton("注册表", 112, 104, 75, 25, 0)
$Button7 = GUICtrlCreateButton("Msconfig", 216, 56, 75, 25, 0)
$Button8 = GUICtrlCreateButton("音量控制", 216, 104, 75, 25, 0)
$Button9 = GUICtrlCreateButton("策略组", 216, 8, 75, 25, 0)
$Input1 = GUICtrlCreateInput("", 8, 148, 121, 25)
$Button10 = GUICtrlCreateButton("运行", 144, 148, 43, 25, 0)
$Button11 = GUICtrlCreateButton("时间日期", 216, 144, 75, 25, 0)
GUICtrlCreateLabel("", 184, 176, 4, 4)
$Label1 = GUICtrlCreateLabel("小王维护工具", 176, 186, 132, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_RunDOS(@SystemDir &"/sysdm.cpl");打开系统属性
Case $Button2
_RunDOS(@SystemDir &"/desk.cpl");打开显示属性
Case $Button3
Run(@SystemDir &"/taskmgr.exe");打开任务管理器
Case $Button4
Run(@SystemDir &"/control.exe");打开控制面板
Case $Button5
Run(@SystemDir &"/cmd.exe");打开命令行
Case $Button6
Run(@WindowsDir &"/regedit.exe");打开注册表
Case $Button7
Run(@SystemDir &"/Msconfig.exe");打开msconfig
Case $Button8
Run(@SystemDir &"/Sndvol32.exe");打开音量控制程序
Case $Button9
ShellExecute(@SystemDir &"/gpedit.msc");打开策略组 另一种写法Run(@ComSpec&' /c gpedit.msc',@SystemDir,@SW_HIDE)
Case $Button10
Run(@ComSpec &" /c"&GUICtrlRead($input1));这里是这个作品的关键 读取文本框里的内容然后运行
Case $Button11
_RunDOS(@SystemDir &"/timedate.cpl");打开时间日期
Case $Label1
EndSwitch
WEnd
AU3的脚本和源码
最新推荐文章于 2023-04-11 15:13:24 发布