#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=D:\我的文档\Desktop\4-1\4-01.kxf
Global $gu_Form2 = GUICreate("文件选择", 391, 103, 193, 125)
Global $gu_Group1 = GUICtrlCreateGroup("", 8, 8, 377, 89)
Global $gu_Input1 = GUICtrlCreateInput("", 16, 24, 297, 21)
Global $gu_Button1 = GUICtrlCreateButton("选 择", 321, 21, 57, 25)
Global $gu_Button2 = GUICtrlCreateButton("执 行", 240, 56, 65, 33)
Global $gu_Button3 = GUICtrlCreateButton("退 出", 313, 56, 65, 33)
Global $gu_Label1 = GUICtrlCreateLabel("请选择正确的EXE文件", 16, 64, 164, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $gu_Button1
$gu_Inputa1 = FileOpenDialog('选择文件', '', 'exe文件(*.exe)', 1, '', $gu_Form2)
GUICtrlSetData($gu_Input1, $gu_Input1)
Case $gu_Button2
RunWait("" & GUICtrlRead($gu_Input1))
Case $gu_Button3
Exit
EndSwitch
WEnd