|
本帖最后由 19377708 于 2010-9-8 13:45 编辑
如何才能实现点击 GUI中浏览(&R)按钮就出现“浏览文件夹”对话框 ,并且把浏览的路径写入$Form1 = GUICreate("请选择游戏安装目录", 312, 115, 379, 143)当中,小弟刚刚接触Au3,请高手指点,最好有详细解释,非常感谢!
下面是GUI界面源码:
#include <GUIConstants.au3>
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("请选择游戏安装目录", 312, 115, 379, 143)
GUISetOnEvent($GUI_EVENT_CLOSE, "tuichu");退出按钮
$Button1 = GUICtrlCreateButton("确定(&O)", 33, 75, 75, 25, 0)
GUICtrlSetOnEvent($Button1, "queding");确定按钮
$Button2 = GUICtrlCreateButton("取消(&C)", 130, 75, 75, 25, 0)
GUICtrlSetOnEvent($Button2,"quxiao");取消按钮
$Input1 = GUICtrlCreateInput("请选择游戏安装目录", 8, 40, 217, 21)
$Button3 = GUICtrlCreateButton("浏览(&R)", 232, 40, 75, 25, 0)
GUICtrlSetOnEvent($Button3, "liulang");浏览按钮,点这个按钮就出现“浏览文件夹”对话框 ,并且把浏览的路径写入$Form1 = GUICreate("请选择游戏安装目录", 312, 115, 379, 143)当中,
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
Sleep(100)
WEnd
Func liulang();浏览按钮,
exit
EndFunc
Func queding();确定按钮
exit
EndFunc
Func quxiao();取消按钮
exit
EndFunc
Func tuichu()
Exit
EndFunc |
评分
-
查看全部评分
|