#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 213, 186, 281, 217)
$Button1 = GUICtrlCreateButton("查询", 64, 128, 89, 33)
$Combo1 = GUICtrlCreateCombo("", 64, 24, 89, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUISetState(@SW_SHOW)
$rdini = IniReadSection('data.ini', '结果')
For $i = 1 To $rdini[0][0]
;MsgBox(0, '', $rdini[$i][0])
GUICtrlSetData($Combo1, $rdini[$i][0])
Next
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$rd = GUICtrlRead($Combo1)
MsgBox(0, '', IniRead('data.ini', '结果', $rd, 0))
EndSwitch
WEnd
配置文件:
data.ini
[结果]
阿木=吧主
敏=管理员
水铃=管理员
fuldho=会员 |