#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("Form1", 364, 146, -1, -1)
$Button1 = GUICtrlCreateButton("选择", 312, 48, 27, 21)
$Input1 = GUICtrlCreateInput("Input1", 32, 48, 265, 21)
$Button2 = GUICtrlCreateButton("确定", 112, 96, 131, 21)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$Browser = FileOpenDialog ( "选择" , @ProgramFilesDir & "\" , "可执行程序(*.exe)" , 1 + 2 )
GUICtrlSetData ( $Input1, $Browser )
Case $Button2
MsgBox ( 0, "提示", GUICtrlRead ( $Input1 ) )
IniWrite ( "11.ini", "1", "2", GUICtrlRead ( $Input1 ) )
EndSwitch
WEnd
直接输入的值可以写入配置文件,但选择的值就不能写入了,请各位指点,谢谢! |