本帖最后由 飘云 于 2011-10-4 15:55 编辑
不太明白lz的意思
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("测试", 200, 100, -1, -1)
$Input1 = GUICtrlCreateInput("D:\", 5, 10, 120, 20)
$Button1 = GUICtrlCreateButton("浏览", 130, 10, 65, 25)
$Button2 = GUICtrlCreateButton("查看", 130, 50, 65, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Select
Case $nMsg = $GUI_EVENT_CLOSE
Exit
Case $nMsg = $Button1
$Search1 = FileSelectFolder("请选择一个文件夹:", "",2+4,"D:\",$Form1)
GUICtrlSetData($Input1,$Search1)
Case $nMsg = $Button2
$Search = GUICtrlRead($Input1)
MsgBox(64, "查看", "这个路径是"&$Search)
EndSelect
WEnd
|