|
实现回车即可执行程序
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=D:\autoit3\Aut2Exe\Icons\exec.ico
#AutoIt3Wrapper_outfile=维护工具.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Process.au3>
#Region ### START Koda GUI section ### Form=c:\documents and settings\cface\桌面\form1.kxf
Opt("TrayIconHide", 1)
$Form1 = GUICreate(" ->维护工具", 278, 215, 399, 154)
GUISetIcon("D:\autoit3\Aut2Exe\Icons\exec.ico")
$Button1 = GUICtrlCreateButton("录音调控", 16, 8, 75, 25, 0)
$Button2 = GUICtrlCreateButton("声音调控", 16, 56, 75, 25, 0)
$Button3 = GUICtrlCreateButton("进程管理", 16, 104, 75, 25, 0)
$Button4 = GUICtrlCreateButton("控制面版", 104, 8, 75, 25, 0)
$Button5 = GUICtrlCreateButton("命令行", 104, 56, 75, 25, 0)
$Button6 = GUICtrlCreateButton("注册表", 104, 104, 75, 25, 0)
$Button7 = GUICtrlCreateButton("计算器", 192, 8, 75, 25, 0)
$Button8 = GUICtrlCreateButton("画图工具", 192, 56, 75, 25, 0)
$Button9 = GUICtrlCreateButton("测试网络", 192, 104, 75, 25, 0)
$Button10 = GUICtrlCreateButton("运行 ", 120, 144, 59, 25, 0)
$Button11 = GUICtrlCreateButton("时间日期", 192, 144, 75, 25, 0)
$input = GUICtrlCreateInput("", 16, 144, 97, 21)
$Label1 = GUICtrlCreateLabel("QQ:494249100 我们一直用心服务!", 40, 184, 217, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_RunDOS(@SystemDir &"\sndrec32.exe");打开系统属性
Case $Button2
_RunDOS(@SystemDir &"\sndvol32.exe");打开显示属性
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("calc.exe");打开计算器
Case $Button8
Run(@SystemDir &"\mspaint");打开音量控制程序
Case $Button9
$rc = _RunDos("start ping 172.16.1.1 -t")
;打开策略组 另一种写法Run(@ComSpec&' /c gpedit.msc',@SystemDir,@SW_HIDE)
Case $Button10
Run(@ComSpec &" /c "&GUICtrlRead($input) );这里是这个作品的关键 读取文本框里的内容然后运行
Send("{enter}")
Case $Button11
_RunDOS(@SystemDir &"\timedate.cpl");打开时间日期
Case $Label1
EndSwitch
WEnd[quote]#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=D:\autoit3\Aut2Exe\Icons\exec.ico
#AutoIt3Wrapper_outfile=维护工具.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Process.au3>
#Region ### START Koda GUI section ### Form=c:\documents and settings\cface\桌面\form1.kxf
Opt("TrayIconHide", 1)
$Form1 = GUICreate(" ->维护工具", 278, 215, 399, 154)
GUISetIcon("D:\autoit3\Aut2Exe\Icons\exec.ico")
$Button1 = GUICtrlCreateButton("录音调控", 16, 8, 75, 25, 0)
$Button2 = GUICtrlCreateButton("声音调控", 16, 56, 75, 25, 0)
$Button3 = GUICtrlCreateButton("进程管理", 16, 104, 75, 25, 0)
$Button4 = GUICtrlCreateButton("控制面版", 104, 8, 75, 25, 0)
$Button5 = GUICtrlCreateButton("命令行", 104, 56, 75, 25, 0)
$Button6 = GUICtrlCreateButton("注册表", 104, 104, 75, 25, 0)
$Button7 = GUICtrlCreateButton("计算器", 192, 8, 75, 25, 0)
$Button8 = GUICtrlCreateButton("画图工具", 192, 56, 75, 25, 0)
$Button9 = GUICtrlCreateButton("测试网络", 192, 104, 75, 25, 0)
$Button10 = GUICtrlCreateButton("运行 ", 120, 144, 59, 25, 0)
$Button11 = GUICtrlCreateButton("时间日期", 192, 144, 75, 25, 0)
$input = GUICtrlCreateInput("", 16, 144, 97, 21)
$Label1 = GUICtrlCreateLabel("QQ:494249100 我们一直用心服务!", 40, 184, 217, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_RunDOS(@SystemDir &"\sndrec32.exe");打开系统属性
Case $Button2
_RunDOS(@SystemDir &"\sndvol32.exe");打开显示属性
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("calc.exe");打开计算器
Case $Button8
Run(@SystemDir &"\mspaint");打开音量控制程序
Case $Button9
$rc = _RunDos("start ping 172.16.1.1 -t")
;打开策略组 另一种写法Run(@ComSpec&' /c gpedit.msc',@SystemDir,@SW_HIDE)
Case $Button10
Run(@ComSpec &" /c "&GUICtrlRead($input) );这里是这个作品的关键 读取文本框里的内容然后运行
Send("{enter}")
Case $Button11
_RunDOS(@SystemDir &"\timedate.cpl");打开时间日期
Case $Label1
EndSwitch
WEnd
Button10 如何 实现回车即可执行程序 |
|