#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("Form1", 625, 445, 193, 125)
$Input1 = GUICtrlCreateInput("", 88, 96, 217, 21)
$Button1 = GUICtrlCreateButton("Button1", 312, 88, 75, 25, 0)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$var = FileSelectFolder("请选择一个文件夹:", "", 7)
If Not @error Then
GUICtrlSetData($Input1, $var)
EndIf
EndSwitch
WEnd
應該是這樣子吧 |