本帖最后由 261869247 于 2010-3-29 12:06 编辑
以下是借用论坛网友的代码 读取INI 文件的 #include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 256, 115, 192, 124)
$Combo1 = GUICtrlCreateCombo("", 40, 32, 145, 25)
GUISetState(@SW_SHOW)
read()
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func read()
$var = IniReadSectionNames("123.ini")
If @error Then
MsgBox(4096, "", "错误, 读取INI文件失败.")
Else
For $i = 1 To $var[0]
GUICtrlSetData($Combo1,$var[$i])
Next
EndIf
EndFunc
|