本帖最后由 omegabomb 于 2009-8-4 11:07 编辑 #include<GUIConstants.au3>
GUICreate("GUI",200,100)
$path=GUICtrlCreateInput("",10,20,100,20)
$select=GUICtrlCreateButton("浏览",120,20,50,20)
$confirm=GUICtrlCreateButton("写入",10,50,50,20)
GUISetState(@SW_SHOW)
While 1
$nMsg=GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
ExitLoop
Case $select
$selectpath=FileOpenDialog("打开",@DesktopDir,"应用程序(*.exe)")
GUICtrlSetData($path,$selectpath)
Case $confirm
IniWrite("c.ini","class","path",GUICtrlRead($path))
EndSwitch
WEnd
不能在c.ini中写入对应的值,为什么呢? |