回复 afan
如果搜索名字的同时``也能搜索关键子怎么做? 与下边的结合
Func _sou()
...
410521a 发表于 2010-7-1 17:51 Func _sou()
Local $sodu = GUICtrlRead($Input5_1)
If $sodu = "" Then Return MsgBox(16, "错误", "搜索框没有输入数据!")
Local $read = IniRead($udata, "数据库", $sodu, "")
If $read <> "" Then
_GUICtrlListView_DeleteAllItems($ListView5_1)
Local $iindex = GUICtrlCreateListViewItem($read, $ListView5_1)
_GUICtrlListView_ClickItem($ListView5_1, $iindex)
Else
Local $sR = StringRegExp(FileRead($udata), '\=(' & $sodu & '\|.+)', 3)
If Not @error Then
_GUICtrlListView_DeleteAllItems($ListView5_1)
Local $iindex = GUICtrlCreateListViewItem($sR[0], $ListView5_1)
_GUICtrlListView_ClickItem($ListView5_1, $iindex)
Else
MsgBox(48, "提示", $sodu & "未找到!")
EndIf
EndIf
EndFunc ;==>_sou
|