本帖最后由 xms77 于 2014-2-26 12:49 编辑
楼主你的ini文件好像应该这样写:
[a]
32191101=徐小明
32191102=韩婆 韩海
32191103=梁凤
代码如下:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiStatusBar.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=c:\documents and settings\xp\my documents\form1.kxf
$Form1_1 = GUICreate("业主资料查询", 250, 180, 273, 446)
$Input1 = GUICtrlCreateInput("", 16, 32, 121, 21)
$StatusBar1 = _GUICtrlStatusBar_Create($Form1_1)
$Label1 = GUICtrlCreateLabel("请输入:", 16, 8, 52, 17)
$Button1 = GUICtrlCreateButton("搜索", 152, 32, 50, 25)
$Edit1 = GUICtrlCreateEdit("", 16, 72, 200, 60)
GUICtrlSetData(-1, "张小龙 钟小华 钟小明")
GUISetState(@SW_SHOW)
Local $Name
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
Exit
Case $msg = $Button1
$Name = IniRead(@ScriptDir & '\myfile.ini','a',GUICtrlRead($Input1),"未搜到")
GUICtrlSetData($Edit1, @CRLF & $Name,1)
EndSelect
Sleep(100)
WEnd
|