|
发表于 2011-3-28 15:30:16
|
显示全部楼层
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("快捷键", 216, 182, -1, -1)
$Button1 = GUICtrlCreateButton("打开.exe文件", 8, 8, 193, 49)
$Button2 = GUICtrlCreateButton("打开.cpl文件", 8, 64, 193, 49)
$Button3 = GUICtrlCreateButton("打开.msc文件", 8, 120, 193, 49)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Run("cmd.exe");system32目录下的EXE文件可以直接调用
Case $Button2
Run("control desk.cpl");control(control.exe)是控制面版。 desk.cpl是调用control.exe里面的参数,也就是显示桌面属性。
Case $Button3
ShellExecute("gpedit.msc","组策略","","open","$SW_HIDE") ;这一句可以查看sehllExecute说明
EndSwitch
WEnd |
|