卡壳了,不得不发贴,判断ListView项目复选框是否选中?(解决)
本帖最后由 夜猫猫 于 2011-7-25 18:03 编辑看图说话:
论坛搜索后,参考最接近的贴子 水木子:http://www.autoitx.com/forum.php?mod=viewthread&tid=9730&highlight=ListView%2B%B8%B4%D1%A1%BF%F2
不能获取ID,我想是不是图标造成?
不是不动脑子.还是希望得到帮助.在此谢谢! {:1_236:}
测试的代码隐藏起来了#cs-#ce
这源码不是原来的::face (31): 是原来的
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>
#Include <SendMessage.au3>
Global $icon,$CKBOXE_ID
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("搜索文件测试", 564, 577, 192, 124)
$Label1 = GUICtrlCreateLabel("搜索路径:", 55, 42, 60, 20)
$Input1 = GUICtrlCreateInput("G:\网络游戏", 110, 37, 133, 20)
$Label2 = GUICtrlCreateLabel("搜索匹配:", 330, 42, 60, 20)
$Input2 = GUICtrlCreateInput("Client,Launcher,patcher,qq,online,Setup", 385, 37, 133, 20)
$Button1 = GUICtrlCreateButton("浏览", 250, 35, 50, 25)
$Button2 = GUICtrlCreateButton("搜索", 232, 95, 97, 33)
$Button3 = GUICtrlCreateButton("(全选)", 132, 537, 97, 33)
$Button4 = GUICtrlCreateButton("(添加)", 332, 537, 97, 33)
;$Checkbox1 = GUICtrlCreateCheckbox("", 0, 0, 17, 17)
$Label3 = GUICtrlCreateLabel("", 110, 70, 450, 20)
$ListView = GUICtrlCreateListView(' 选择| 主文件夹名 | 文件路径', 5, 140, 555, 390)
_GUICtrlListView_SetExtendedListViewStyle($ListView , BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES))
_GUICtrlListView_SetColumnWidth($ListView, 0, 61)
_GUICtrlListView_SetColumnWidth($ListView, 1, 100)
_GUICtrlListView_SetColumnWidth($ListView, 2, 355)
$LHand = GUICtrlGetHandle ($ListView)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$file = FileSelectFolder("选择文件夹.", "")
GUICtrlSetData($Input1,$file)
Case $Button2
_SendMessage($LHand,$LVM_DELETEALLITEMS)
Search(GUICtrlRead($Input1), "exe")
Case $Button3
_GUICtrlListView_SetItemChecked($listview, -1)
;_GUICtrlListView_SetItemChecked($hListView, -1, False)
Case $Button4
;MsgBox(0, "listview 项目", GUICtrlRead(GUICtrlRead($listview)), 2)
#cs
$jg=""
For $I = 0 To _GUICtrlListView_GetItemCount($ListView)
If_GUICtrlListView_SetItemChecked($ListView, $u[$I]) = True Then
$jg &= '第 ' & $I & ' 行已勾选' & @CRLF
EndIf
Next
MsgBox(0, '勾选的项目', $jg)
;=================================================================
For $I = 0 To _GUICtrlListView_GetItemCount($listview)
If GUICtrlRead($CKBOXE_ID[$I], 1) = $GUI_CHECKED Then
$jg &= '第 ' & $I & ' 行:"' & _GUICtrlListView_GetItemText($listview, $I - 1) & '" 已勾选' & @CRLF
EndIf
Next
MsgBox(0, '勾选的项目', $jg)
#ce
EndSwitch
WEnd
Func Search($current, $ext)
Local $search = FileFindFirstFile($current & "\*.*") ;搜索路径下所有文件
Local $sPathExclude=GUICtrlRead($Input2);搜索使用不排除的数值
While 1
Dim $file = FileFindNextFile($search) ;返回搜索数值
If @error Or StringLen($file) < 1 Then ExitLoop ;如果错误,那么退出
If Not StringInStr(FileGetAttrib($current & "\" & $file), "D") And ($file <> "."Or $file <> "..") Then ;如果非检查文件目录
If StringRight($current & "\" & $file, StringLen($ext)) = $ext Then ;匹配文件中扩展名
$a_Arr=StringSplit($current & "\" & $file,"\") ;拆分路径。判断输出文件夹名
If UBound($a_Arr) = 2Then
$FileNmae = $a_Arr
ElseIf UBound($a_Arr) = 3 Then
$FileNmae = $a_Arr
ElseIf UBound($a_Arr) = 4Then
$FileNmae = $a_Arr
Else
$FileNmae = $a_Arr
EndIf
;$Nmae=_getfilename($current & "\" & $file) ;多余的动作.直接使用$file If$sPathExcludeAndStringLen($sPathExclude)>0Then$sPathExclude=StringSplit($sPathExclude,",");读取排除数值
$z = 0
For $I=0 To UBound($sPathExclude) - 1
If StringInStr($file, $sPathExclude[$I]) Then ;匹配文件名数值是否包含不排除数值
GUICtrlSetData($Label3,$current & "\" & $file)
$CKBOXE_ID[$I] = GUICtrlCreateListViewItem("|"&$FileNmae& '|' & $current & "\" & $file, $ListView)
GUICtrlSetImage(-1, $current & "\" & $file)
;ReDim $CKBOXE_ID[$I + 2]
EndIf
Next
EndIf
EndIf
If StringInStr(FileGetAttrib($current & "\" & $file), "D") And ($file <> "."Or $file <> "..") Then ;检查文件目录
Search($current & "\" & $file, $ext)
EndIf
WEnd
Return
EndFunc ;==>Search
#cs
;正则获取文件名函数
Func _getfilename($spath, $sflag = 0)
If $sflag = 0 Then
$sflag = 0
Else
$sflag = 1
EndIf
If $sflag = 0 Then
$sFileName = StringRegExpReplace($spath, '.+\\', '')
Else
$sFileName = StringRegExpReplace($spath, '.+\\', '')
$sFileName = StringRegExpReplace($sFileName, '\.[^\.]*$', '')
EndIf
Return ($sFileName)
EndFunc ;==>_getfilename
#ce
主文件夹名是什么意思?
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>
#include <SendMessage.au3>
#include <array.au3>
#include <GuiImageList.au3>
#include <winapiex.au3>
Global $icon, $CKBOXE_ID
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("搜索文件测试", 564, 577, 192, 124)
$Label1 = GUICtrlCreateLabel("搜索路径:", 55, 42, 60, 20)
$Input1 = GUICtrlCreateInput("G:\网络游戏", 110, 37, 133, 20)
$Label2 = GUICtrlCreateLabel("搜索匹配:", 330, 42, 60, 20)
$Input2 = GUICtrlCreateInput("Client,Launcher,patcher,qq,online,Setup", 385, 37, 133, 20)
$Button1 = GUICtrlCreateButton("浏览", 250, 35, 50, 25)
$Button2 = GUICtrlCreateButton("搜索", 232, 95, 97, 33)
$Button3 = GUICtrlCreateButton("(全选)", 132, 537, 97, 33)
$Button4 = GUICtrlCreateButton("(添加)", 332, 537, 97, 33)
;$Checkbox1 = GUICtrlCreateCheckbox("", 0, 0, 17, 17)
$Label3 = GUICtrlCreateLabel("", 110, 70, 450, 20)
$ListView = GUICtrlCreateListView(' 选择| 主文件夹名 | 文件路径', 5, 140, 555, 390, -1, 0x00000004 + 0x00000020)
;~ _GUICtrlListView_SetExtendedListViewStyle($ListView, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES))
_GUICtrlListView_SetColumnWidth($ListView, 0, 64 + 24)
_GUICtrlListView_SetColumnWidth($ListView, 1, 100)
_GUICtrlListView_SetColumnWidth($ListView, 2, 355)
$LHand = GUICtrlGetHandle($ListView)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$file = FileSelectFolder("选择文件夹.", "")
GUICtrlSetData($Input1, $file)
Case $Button2
_SendMessage($LHand, $LVM_DELETEALLITEMS)
$arr = _RecFileListToArray(GUICtrlRead($Input1), "*.exe", 1, 1, 0, 2)
Local $image = _GUIImageList_Create(64, 64, 5, 3)
For $i = 1 To $arr
ConsoleWrite($arr[$i] & @CRLF)
If _WinAPI_ExtractIconEx($arr[$i], -1, 0, 0, 0) > 0 Then
_GUIImageList_AddIcon($image, $arr[$i], 0, True)
Else
$hIcon = _WinAPI_ShellExtractAssociatedIcon($arr[$i], 0)
_GUIImageList_ReplaceIcon($image, -1, $hIcon)
_WinAPI_DestroyIcon($hIcon)
EndIf
Next
_GUICtrlListView_SetImageList($ListView, $image, 1)
Local $array[$arr]
For $i = 1 To $arr
_GUICtrlListView_AddItem($ListView, "", $i-1)
;~ _GUICtrlListView_AddSubItem($ListView, $i - 1, StringRegExpReplace($arr[$i], '.+\\', ''), 1)
_GUICtrlListView_AddSubItem($ListView, $i - 1, StringRegExpReplace($arr[$i], StringRegExpReplace(GUICtrlRead($Input1), '\\', '\\\\') & '\\(.+)\\.*', '$1'), 1)
_GUICtrlListView_AddSubItem($ListView, $i - 1, $arr[$i], 2)
$array[$i - 1] = StringRegExpReplace($arr[$i], '.+\\', '')
$array[$i - 1] = StringRegExpReplace($arr[$i], StringRegExpReplace(GUICtrlRead($Input1), '\\', '\\\\') & '\\(.+)\\.*', '$1')
$array[$i - 1] = $arr[$i]
Next
Case $Button3
_GUICtrlListView_SetItemChecked($ListView, -1)
Case $Button4
;~ MsgBox(0, "listview 项目", GUICtrlRead(GUICtrlRead($listview)), 2)
Local $jg
For $i = 0 To _GUICtrlListView_GetItemCount($ListView)
If _GUICtrlListView_GetItemChecked(GUICtrlGetHandle($ListView), $i) = $GUI_CHECKED Then
$jg &= '第 ' &$i & ' 行:"' & _GUICtrlListView_GetItemText($ListView, $i, 2) & '" 已勾选' & @CRLF
EndIf
Next
MsgBox(0, '勾选的项目', $jg)
EndSwitch
WEnd
Func _RecFileListToArray($sInitialPath, $sInclude_List = "*", $iReturn = 0, $iRecur = 0, $iSort = 0, $iReturnPath = 1, $sExclude_List = "", $sExclude_List_Folder = "")
Local $asReturnList = , $asFileMatchList = , $asRootFileMatchList = , $asFolderMatchList = , $asFolderSearchList =
Local $sFolderSlash = "", $iMaxLevel, $sInclude_File_Mask, $sExclude_File_Mask, $sInclude_Folder_Mask = ".+", $sExclude_Folder_Mask = ":"
Local $hSearch, $fFolder, $sRetPath = "", $sCurrentPath, $sName
Local $asFolderFileSectionList = [], $sFolderToFind, $iFileSectionStartIndex, $iFileSectionEndIndex
If Not FileExists($sInitialPath) Then Return SetError(1, 1, "")
If StringRight($sInitialPath, 1) = "\" Then
$sFolderSlash = "\"
Else
$sInitialPath = $sInitialPath & "\"
EndIf
$asFolderSearchList = $sInitialPath
If $iRecur > 1 Or Not IsInt($iRecur) Then Return SetError(1, 4, "")
If $iRecur < 0 Then
StringReplace($sInitialPath, "\", "", 2)
$iMaxLevel = @extended - $iRecur
EndIf
If $sInclude_List = "*" Then
$sInclude_File_Mask = ".+"
Else
If Not _RFLTA_ListToMask($sInclude_File_Mask, $sInclude_List) Then Return SetError(1, 2, "")
EndIf
Switch $iReturn
Case 0
Switch $iRecur
Case 0
$sInclude_Folder_Mask = $sInclude_File_Mask
EndSwitch
Case 2
$sInclude_Folder_Mask = $sInclude_File_Mask
EndSwitch
If $sExclude_List = "" Then
$sExclude_File_Mask = ":"
Else
If Not _RFLTA_ListToMask($sExclude_File_Mask, $sExclude_List) Then Return SetError(1, 7, "")
EndIf
Switch $iReturn
Case 0
Switch $iRecur
Case 0
$sExclude_Folder_Mask = $sExclude_File_Mask
Case Else
If $sExclude_List_Folder <> "" Then
If Not _RFLTA_ListToMask($sExclude_Folder_Mask, $sExclude_List_Folder) Then Return SetError(1, 8, "")
EndIf
EndSwitch
Case 2
$sExclude_Folder_Mask = $sExclude_File_Mask
EndSwitch
If Not ($iReturn = 0 Or $iReturn = 1 Or $iReturn = 2) Then Return SetError(1, 3, "")
If Not ($iSort = 0 Or $iSort = 1 Or $iSort = 2) Then Return SetError(1, 5, "")
If Not ($iReturnPath = 0 Or $iReturnPath = 1 Or $iReturnPath = 2) Then Return SetError(1, 6, "")
While $asFolderSearchList > 0
$sCurrentPath = $asFolderSearchList[$asFolderSearchList]
$asFolderSearchList -= 1
Switch $iReturnPath
Case 1
$sRetPath = StringReplace($sCurrentPath, $sInitialPath, "")
Case 2
$sRetPath = $sCurrentPath
EndSwitch
$hSearch = FileFindFirstFile($sCurrentPath & "*")
If $iReturn = 0 And $iSort And $iReturnPath Then
_RFLTA_AddToList($asFolderFileSectionList, $sRetPath, $asFileMatchList + 1)
EndIf
If $hSearch = -1 Then
ContinueLoop
EndIf
While 1
$sName = FileFindNextFile($hSearch)
If @error Then
ExitLoop
EndIf
$fFolder = @extended
If $fFolder Then
Select
Case $iRecur < 0
StringReplace($sCurrentPath, "\", "", 0, 2)
If @extended < $iMaxLevel Then
ContinueCase
EndIf
Case $iRecur = 1
If Not StringRegExp($sName, $sExclude_Folder_Mask) Then
_RFLTA_AddToList($asFolderSearchList, $sCurrentPath & $sName & "\")
EndIf
EndSelect
EndIf
If $iSort Then
If $fFolder Then
If StringRegExp($sName, $sInclude_Folder_Mask) And Not StringRegExp($sName, $sExclude_Folder_Mask) Then
_RFLTA_AddToList($asFolderMatchList, $sRetPath & $sName & $sFolderSlash)
EndIf
Else
If StringRegExp($sName, $sInclude_File_Mask) And Not StringRegExp($sName, $sExclude_File_Mask) Then
If $sCurrentPath = $sInitialPath Then
_RFLTA_AddToList($asRootFileMatchList, $sRetPath & $sName)
Else
_RFLTA_AddToList($asFileMatchList, $sRetPath & $sName)
EndIf
EndIf
EndIf
Else
If $fFolder Then
If $iReturn <> 1 And StringRegExp($sName, $sInclude_Folder_Mask) And Not StringRegExp($sName, $sExclude_Folder_Mask) Then
_RFLTA_AddToList($asReturnList, $sRetPath & $sName & $sFolderSlash)
EndIf
Else
If $iReturn <> 2 And StringRegExp($sName, $sInclude_File_Mask) And Not StringRegExp($sName, $sExclude_File_Mask) Then
_RFLTA_AddToList($asReturnList, $sRetPath & $sName)
EndIf
EndIf
EndIf
WEnd
FileClose($hSearch)
WEnd
If $iSort Then
Switch $iReturn
Case 0
If $asRootFileMatchList = 0 And $asFolderMatchList = 0 Then Return SetError(1, 9, "")
Case 1
If $asRootFileMatchList = 0 And $asFileMatchList = 0 Then Return SetError(1, 9, "")
Case 2
If $asFolderMatchList = 0 Then Return SetError(1, 9, "")
EndSwitch
Switch $iReturn
Case 2
ReDim $asFolderMatchList[$asFolderMatchList + 1]
$asReturnList = $asFolderMatchList
_RFLTA_ArraySort($asReturnList)
Case 1
If $iReturnPath = 0 Then
_RFLTA_AddFileLists($asReturnList, $asRootFileMatchList, $asFileMatchList)
_RFLTA_ArraySort($asReturnList)
Else
_RFLTA_AddFileLists($asReturnList, $asRootFileMatchList, $asFileMatchList, 1)
EndIf
Case 0
If $iReturnPath = 0 Then
_RFLTA_AddFileLists($asReturnList, $asRootFileMatchList, $asFileMatchList)
$asReturnList += $asFolderMatchList
ReDim $asFolderMatchList[$asFolderMatchList + 1]
_RFLTA_ArrayConcatenate($asReturnList, $asFolderMatchList)
_RFLTA_ArraySort($asReturnList)
Else
Local $asReturnList[$asFileMatchList + $asRootFileMatchList + $asFolderMatchList + 1]
$asReturnList = $asFileMatchList + $asRootFileMatchList + $asFolderMatchList
_RFLTA_ArraySort($asRootFileMatchList, 1, $asRootFileMatchList)
For $i = 1 To $asRootFileMatchList
$asReturnList[$i] = $asRootFileMatchList[$i]
Next
Local $iNextInsertionIndex = $asRootFileMatchList + 1
_RFLTA_ArraySort($asFolderMatchList, 1, $asFolderMatchList)
For $i = 1 To $asFolderMatchList
If $sFolderSlash Then
$sFolderToFind = $asFolderMatchList[$i]
Else
$sFolderToFind = $asFolderMatchList[$i] & "\"
EndIf
For $j = 1 To $asFolderFileSectionList
If $sFolderToFind = $asFolderFileSectionList[$j] Then ExitLoop
Next
$iFileSectionStartIndex = $asFolderFileSectionList[$j]
If $j = $asFolderFileSectionList Then
$iFileSectionEndIndex = $asFileMatchList
Else
$iFileSectionEndIndex = $asFolderFileSectionList[$j + 1] - 1
EndIf
If $iSort = 1 Then
_RFLTA_ArraySort($asFileMatchList, $iFileSectionStartIndex, $iFileSectionEndIndex)
EndIf
$asReturnList[$iNextInsertionIndex] = $asFolderMatchList[$i]
$iNextInsertionIndex += 1
For $j = $iFileSectionStartIndex To $iFileSectionEndIndex
$asReturnList[$iNextInsertionIndex] = $asFileMatchList[$j]
$iNextInsertionIndex += 1
Next
Next
EndIf
EndSwitch
Else
If $asReturnList = 0 Then Return SetError(1, 9, "")
ReDim $asReturnList[$asReturnList + 1]
EndIf
Return $asReturnList
EndFunc ;==>_RecFileListToArray
Func _RFLTA_ListToMask(ByRef $sMask, $sList)
If StringRegExp($sList, "\\|/|:|\<|\>|\|") Then Return 0
$sList = StringReplace(StringStripWS(StringRegExpReplace($sList, "\s*;\s*", ";"), 3), ";", "|")
$sList = StringReplace(StringReplace(StringRegExpReplace($sList, "(\^|\$|\.)", "\\$1"), "?", "."), "*", ".*?")
$sMask = "(?i)^(" & $sList & ")\z"
Return 1
EndFunc ;==>_RFLTA_ListToMask
Func _RFLTA_AddToList(ByRef $aList, $vValue_0, $vValue_1 = -1)
If $vValue_1 = -1 Then
$aList += 1
If UBound($aList) <= $aList Then ReDim $aList
$aList[$aList] = $vValue_0
Else
$aList += 1
If UBound($aList) <= $aList Then ReDim $aList
$aList[$aList] = $vValue_0
$aList[$aList] = $vValue_1
EndIf
EndFunc ;==>_RFLTA_AddToList
Func _RFLTA_AddFileLists(ByRef $asTarget, $asSource_1, $asSource_2, $iSort = 0)
ReDim $asSource_1[$asSource_1 + 1]
If $iSort = 1 Then _RFLTA_ArraySort($asSource_1)
$asTarget = $asSource_1
$asTarget += $asSource_2
ReDim $asSource_2[$asSource_2 + 1]
If $iSort = 1 Then _RFLTA_ArraySort($asSource_2)
_RFLTA_ArrayConcatenate($asTarget, $asSource_2)
EndFunc ;==>_RFLTA_AddFileLists
Func _RFLTA_FileListSearch(Const ByRef $avArray, $vValue, $iIndex, $sSlash)
Local $aRet
If Not $sSlash Then $vValue &= "\"
For $i = $iIndex To $avArray
If StringRegExpReplace($avArray[$i], "(^.*\\)(.*)", "\1") = $vValue Then ExitLoop
Next
If $i > $avArray Then
If $iIndex = $avArray Then $iIndex -= 1
For $i = $iIndex + 1 To 1 Step -1
If StringRegExpReplace($avArray[$i], "(^.*\\)(.*)", "\1") = $vValue Then ExitLoop
Next
If $i = 0 Then Return SetError(1, 0, "")
$aRet = $i
For $i = $aRet To 1 Step -1
If StringRegExpReplace($avArray[$i], "(^.*\\)(.*)", "\1") <> $vValue Then ExitLoop
Next
$aRet = $i + 1
Else
$aRet = $i
For $i = $aRet To $avArray
If StringRegExpReplace($avArray[$i], "(^.*\\)(.*)", "\1") <> $vValue Then ExitLoop
Next
$aRet = $i - 1
EndIf
Return $aRet
EndFunc ;==>_RFLTA_FileListSearch
Func _RFLTA_ArraySort(ByRef $avArray, $iStart = 1, $iEnd = -99)
If $iEnd = -99 Then $iEnd = UBound($avArray) - 1
_RFLTA_QuickSort($avArray, $iStart, $iEnd)
EndFunc ;==>_RFLTA_ArraySort
Func _RFLTA_QuickSort(ByRef $avArray, ByRef $iStart, ByRef $iEnd)
Local $vTmp
If ($iEnd - $iStart) < 15 Then
Local $i, $j, $vCur
For $i = $iStart + 1 To $iEnd
$vTmp = $avArray[$i]
If IsNumber($vTmp) Then
For $j = $i - 1 To $iStart Step -1
$vCur = $avArray[$j]
If ($vTmp >= $vCur And IsNumber($vCur)) Or (Not IsNumber($vCur) And StringCompare($vTmp, $vCur) >= 0) Then ExitLoop
$avArray[$j + 1] = $vCur
Next
Else
For $j = $i - 1 To $iStart Step -1
If (StringCompare($vTmp, $avArray[$j]) >= 0) Then ExitLoop
$avArray[$j + 1] = $avArray[$j]
Next
EndIf
$avArray[$j + 1] = $vTmp
Next
Return
EndIf
Local $L = $iStart, $R = $iEnd, $vPivot = $avArray, $fNum = IsNumber($vPivot)
Do
If $fNum Then
While ($avArray[$L] < $vPivot And IsNumber($avArray[$L])) Or (Not IsNumber($avArray[$L]) And StringCompare($avArray[$L], $vPivot) < 0)
$L += 1
WEnd
While ($avArray[$R] > $vPivot And IsNumber($avArray[$R])) Or (Not IsNumber($avArray[$R]) And StringCompare($avArray[$R], $vPivot) > 0)
$R -= 1
WEnd
Else
While (StringCompare($avArray[$L], $vPivot) < 0)
$L += 1
WEnd
While (StringCompare($avArray[$R], $vPivot) > 0)
$R -= 1
WEnd
EndIf
If $L <= $R Then
$vTmp = $avArray[$L]
$avArray[$L] = $avArray[$R]
$avArray[$R] = $vTmp
$L += 1
$R -= 1
EndIf
Until $L > $R
_RFLTA_QuickSort($avArray, $iStart, $R)
_RFLTA_QuickSort($avArray, $L, $iEnd)
EndFunc ;==>_RFLTA_QuickSort
Func _RFLTA_ArrayConcatenate(ByRef $avArrayTarget, Const ByRef $avArraySource)
Local $iUBoundTarget = UBound($avArrayTarget) - 1, $iUBoundSource = UBound($avArraySource)
ReDim $avArrayTarget[$iUBoundTarget + $iUBoundSource]
For $i = 1 To $iUBoundSource - 1
$avArrayTarget[$iUBoundTarget + $i] = $avArraySource[$i]
Next
EndFunc ;==>_RFLTA_ArrayConcatenate
本帖最后由 夜猫猫 于 2011-7-21 02:08 编辑
是二级目录.游戏目录一般都是这样
分类文件夹-游戏文件夹
就是取这游戏文件夹名
搜索速度有点慢,因为是搜索在选择.最终在ListView选择.最好逐个显示
原来排除:QQSpeedLauncher,AutoPatch,FF2Client,UpdateOnline,qqfo,qqhxsj,QQSG,Client,QQLogin,XXZShell,DNF,online,FSBox,Launcher,mir,Launch,KartRider,patcher,patchupdate,Start,TianZi
现在排除:Client,Launcher,patcher,qq,online,Setup
有些会重复搜索. 本帖最后由 netegg 于 2011-7-21 04:07 编辑
回复 3# 夜猫猫
你这个如果先行可以确定文件夹名,为什么不索性先建个数组,然后再做枚举,何必让程序去做判断呢,或者即使是用程序判断,也可以在枚举开始的时候进行排除呀,没太仔细看源码,(没有测试条件,无法还原),具体要求也不清楚,只能给个大概的想法了,不好意思
另外,还有一个,后面跟的那个正则到底是干什么用的? 使用_GUICtrlListView_GetItemChecked(GUICtrlGetHandle($ListView), $i) = $GUI_CHECKED 时.如果第一次添加没有选上,再添加一次的时候.会返回上一次记录递加第二次操作.
本帖最后由 netegg 于 2011-7-21 05:41 编辑
这个要重新执行判断,否则结果势必累计
试试看用beginupdate先更新下,再读取数据
另外,也可以用消息操作试试,把复选框的选定状态人为去除 不行哦._GUICtrlListView_GetItemChecked(GUICtrlGetHandle($ListView), $i) 好像会输出个临时数据
除非把窗口关闭了.才有做用.人为取消勾选.或者重新搜索,都会读取第一次获得的消息.
要怎么获得这个临时数据.我试试能不能清理内存.
不行的话只好重写代码了. 回复 7# 夜猫猫
73行改为Local $jg="" 是二级目录.游戏目录一般都是这样
分类文件夹-游戏文件夹
就是取这游戏文件夹名
搜索速度有点慢,因为是搜索在选择.最终在ListView选择.最好逐个显示
原来排除:QQSpeedLauncher,AutoPatch,FF2Client,UpdateOnline,qqfo,qqhxsj,QQSG,Client,QQLogin,XXZShell,DNF,online,FSBox,Launcher,mir,Launch,KartRider,patcher,patchupdate,Start,TianZi
现在排除:Client,Launcher,patcher,qq,online,Setup
有些会重复搜索.
夜猫猫 发表于 2011-7-21 01:20 http://www.autoitx.com/images/common/back.gif
1.只搜索选择目录下2层吗?
2.只返回选择目录下的第一层目录名吗?
3.排除的文件是所有包含INPUT2里提供的吗?
4.排除的文件如Client是只要包含Client这个关键字就排除吗?还是必须是X:\XXX\Client.exe才排除?
5.区分大小写吗? 本帖最后由 夜猫猫 于 2011-7-21 15:28 编辑
$jg="" 这正常了.呵呵
1 .不是只目录下2层.是所有EXE文件.判断文件名是否包含排除的.如果有就输出.
2.目录下的第一层目录名
3.排除的文件是所有包含INPUT2里提供的.其实不是排除,是要搜索的
4.包含Client的文件名都会输出.不带的不输出.大小不区分
随便问下.如果写入INI时.INI里面已经有,跳过已有的,加入下一条信息用什么语句?
使用 FOR 语句吗? 回复 10# 夜猫猫
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>
#include <SendMessage.au3>
#include <array.au3>
#include <GuiImageList.au3>
#include <winapiex.au3>
Global $icon, $CKBOXE_ID
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("搜索文件测试", 564, 577, 192, 124)
$Label1 = GUICtrlCreateLabel("搜索路径:", 55, 42, 60, 20)
$Input1 = GUICtrlCreateInput("G:\网络游戏", 110, 37, 133, 20)
$Label2 = GUICtrlCreateLabel("搜索匹配:", 330, 42, 60, 20)
$Input2 = GUICtrlCreateInput("Client,Launcher,patcher,qq,online,Setup", 385, 37, 133, 20)
$Button1 = GUICtrlCreateButton("浏览", 250, 35, 50, 25)
$Button2 = GUICtrlCreateButton("搜索", 232, 95, 97, 33)
$Button3 = GUICtrlCreateButton("(全选)", 132, 537, 97, 33)
$Button4 = GUICtrlCreateButton("(添加)", 332, 537, 97, 33)
;$Checkbox1 = GUICtrlCreateCheckbox("", 0, 0, 17, 17)
$Label3 = GUICtrlCreateLabel("", 110, 70, 450, 20)
$ListView = GUICtrlCreateListView(' 选择| 主文件夹名 | 文件路径', 5, 140, 555, 390, -1, 0x00000004 + 0x00000020)
;~ _GUICtrlListView_SetExtendedListViewStyle($ListView, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES))
_GUICtrlListView_SetColumnWidth($ListView, 0, 64 + 24)
_GUICtrlListView_SetColumnWidth($ListView, 1, 100)
_GUICtrlListView_SetColumnWidth($ListView, 2, 355)
$LHand = GUICtrlGetHandle($ListView)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$file = FileSelectFolder("选择文件夹.", "")
GUICtrlSetData($Input1, $file)
Case $Button2
_SendMessage($LHand, $LVM_DELETEALLITEMS)
$filter_name_array=StringSplit(GUICtrlRead($Input2),",",2+1)
Local $filter_name=''
for $i=0 to UBound($filter_name_array)-1
$filter_name&="*"&$filter_name_array[$i]&"*.exe;"
Next
msgbox(0,0,$filter_name)
$arr = _RecFileListToArray(GUICtrlRead($Input1), $filter_name, 1, 1, 0, 2)
if Not IsArray($arr) Then ContinueCase
$filter = StringReplace(GUICtrlRead($Input2), ",", "|")
Local $image = _GUIImageList_Create(64, 64, 5, 3)
For $i = 1 To UBound($arr)-1
;~ ConsoleWrite($arr[$i] & @CRLF)
;~ If Not StringRegExp(StringRegExpReplace($arr[$i], '.+\\', ''), "(?i)^" & $filter, 0) Then
If _WinAPI_ExtractIconEx($arr[$i], -1, 0, 0, 0) > 0 Then
_GUIImageList_AddIcon($image, $arr[$i], 0, True)
Else
$hIcon = _WinAPI_ShellExtractAssociatedIcon($arr[$i], 0)
_GUIImageList_ReplaceIcon($image, -1, $hIcon)
_WinAPI_DestroyIcon($hIcon)
EndIf
;~ EndIf
Next
_GUICtrlListView_SetImageList($ListView, $image, 1)
Local$k=0
For $i = 1 To UBound($arr)-1
;~ If Not StringRegExp(StringRegExpReplace($arr[$i], '.+\\', ''), "(?i)^" & $filter, 0) Then
_GUICtrlListView_AddItem($ListView, "", $k)
;~ _GUICtrlListView_AddSubItem($ListView, $i - 1, StringRegExpReplace($arr[$i], '.+\\', ''), 1)
$path=StringRegExpReplace(GUICtrlRead($Input1), '\\', '\\\\')
$aaa="(?(?="&$path&"\\.*?\\.*)"&$path&"\\(.*?)\\.*|:\\(.*?)\\.*)"
_GUICtrlListView_AddSubItem($ListView, $k, StringRegExpReplace($arr[$i], $aaa, '$1$2'), 1)
_GUICtrlListView_AddSubItem($ListView, $k, $arr[$i], 2)
;~ $array[$i - 1] = StringRegExpReplace($arr[$i], '.+\\', '')
;~ $array[$i - 1] = StringRegExpReplace($arr[$i], StringRegExpReplace(GUICtrlRead($Input1), '\\', '\\\\') & '\\(.*?)\\.*', '$1')
;~ $array[$i - 1] = $arr[$i]
$k += 1
;~ EndIf
Next
Case $Button3
_GUICtrlListView_SetItemChecked($ListView, -1)
Case $Button4
;~ MsgBox(0, "listview 项目", GUICtrlRead(GUICtrlRead($listview)), 2)
Local $jg = ""
For $i = 0 To _GUICtrlListView_GetItemCount($ListView)
If _GUICtrlListView_GetItemChecked(GUICtrlGetHandle($ListView), $i) = $GUI_CHECKED Then
$jg &= '第 ' & $i & ' 行:"' & _GUICtrlListView_GetItemText($ListView, $i, 2) & '" 已勾选' & @CRLF
EndIf
Next
MsgBox(0, '勾选的项目', $jg)
EndSwitch
WEnd
Func _RecFileListToArray($sInitialPath, $sInclude_List = "*", $iReturn = 0, $iRecur = 0, $iSort = 0, $iReturnPath = 1, $sExclude_List = "", $sExclude_List_Folder = "")
Local $asReturnList = , $asFileMatchList = , $asRootFileMatchList = , $asFolderMatchList = , $asFolderSearchList =
Local $sFolderSlash = "", $iMaxLevel, $sInclude_File_Mask, $sExclude_File_Mask, $sInclude_Folder_Mask = ".+", $sExclude_Folder_Mask = ":"
Local $hSearch, $fFolder, $sRetPath = "", $sCurrentPath, $sName
Local $asFolderFileSectionList = [], $sFolderToFind, $iFileSectionStartIndex, $iFileSectionEndIndex
If Not FileExists($sInitialPath) Then Return SetError(1, 1, "")
If StringRight($sInitialPath, 1) = "\" Then
$sFolderSlash = "\"
Else
$sInitialPath = $sInitialPath & "\"
EndIf
$asFolderSearchList = $sInitialPath
If $iRecur > 1 Or Not IsInt($iRecur) Then Return SetError(1, 4, "")
If $iRecur < 0 Then
StringReplace($sInitialPath, "\", "", 2)
$iMaxLevel = @extended - $iRecur
EndIf
If $sInclude_List = "*" Then
$sInclude_File_Mask = ".+"
Else
If Not _RFLTA_ListToMask($sInclude_File_Mask, $sInclude_List) Then Return SetError(1, 2, "")
EndIf
Switch $iReturn
Case 0
Switch $iRecur
Case 0
$sInclude_Folder_Mask = $sInclude_File_Mask
EndSwitch
Case 2
$sInclude_Folder_Mask = $sInclude_File_Mask
EndSwitch
If $sExclude_List = "" Then
$sExclude_File_Mask = ":"
Else
If Not _RFLTA_ListToMask($sExclude_File_Mask, $sExclude_List) Then Return SetError(1, 7, "")
EndIf
Switch $iReturn
Case 0
Switch $iRecur
Case 0
$sExclude_Folder_Mask = $sExclude_File_Mask
Case Else
If $sExclude_List_Folder <> "" Then
If Not _RFLTA_ListToMask($sExclude_Folder_Mask, $sExclude_List_Folder) Then Return SetError(1, 8, "")
EndIf
EndSwitch
Case 2
$sExclude_Folder_Mask = $sExclude_File_Mask
EndSwitch
If Not ($iReturn = 0 Or $iReturn = 1 Or $iReturn = 2) Then Return SetError(1, 3, "")
If Not ($iSort = 0 Or $iSort = 1 Or $iSort = 2) Then Return SetError(1, 5, "")
If Not ($iReturnPath = 0 Or $iReturnPath = 1 Or $iReturnPath = 2) Then Return SetError(1, 6, "")
While $asFolderSearchList > 0
$sCurrentPath = $asFolderSearchList[$asFolderSearchList]
$asFolderSearchList -= 1
Switch $iReturnPath
Case 1
$sRetPath = StringReplace($sCurrentPath, $sInitialPath, "")
Case 2
$sRetPath = $sCurrentPath
EndSwitch
$hSearch = FileFindFirstFile($sCurrentPath & "*")
If $iReturn = 0 And $iSort And $iReturnPath Then
_RFLTA_AddToList($asFolderFileSectionList, $sRetPath, $asFileMatchList + 1)
EndIf
If $hSearch = -1 Then
ContinueLoop
EndIf
While 1
$sName = FileFindNextFile($hSearch)
If @error Then
ExitLoop
EndIf
$fFolder = @extended
If $fFolder Then
Select
Case $iRecur < 0
StringReplace($sCurrentPath, "\", "", 0, 2)
If @extended < $iMaxLevel Then
ContinueCase
EndIf
Case $iRecur = 1
If Not StringRegExp($sName, $sExclude_Folder_Mask) Then
_RFLTA_AddToList($asFolderSearchList, $sCurrentPath & $sName & "\")
EndIf
EndSelect
EndIf
If $iSort Then
If $fFolder Then
If StringRegExp($sName, $sInclude_Folder_Mask) And Not StringRegExp($sName, $sExclude_Folder_Mask) Then
_RFLTA_AddToList($asFolderMatchList, $sRetPath & $sName & $sFolderSlash)
EndIf
Else
If StringRegExp($sName, $sInclude_File_Mask) And Not StringRegExp($sName, $sExclude_File_Mask) Then
If $sCurrentPath = $sInitialPath Then
_RFLTA_AddToList($asRootFileMatchList, $sRetPath & $sName)
Else
_RFLTA_AddToList($asFileMatchList, $sRetPath & $sName)
EndIf
EndIf
EndIf
Else
If $fFolder Then
If $iReturn <> 1 And StringRegExp($sName, $sInclude_Folder_Mask) And Not StringRegExp($sName, $sExclude_Folder_Mask) Then
_RFLTA_AddToList($asReturnList, $sRetPath & $sName & $sFolderSlash)
EndIf
Else
If $iReturn <> 2 And StringRegExp($sName, $sInclude_File_Mask) And Not StringRegExp($sName, $sExclude_File_Mask) Then
_RFLTA_AddToList($asReturnList, $sRetPath & $sName)
EndIf
EndIf
EndIf
WEnd
FileClose($hSearch)
WEnd
If $iSort Then
Switch $iReturn
Case 0
If $asRootFileMatchList = 0 And $asFolderMatchList = 0 Then Return SetError(1, 9, "")
Case 1
If $asRootFileMatchList = 0 And $asFileMatchList = 0 Then Return SetError(1, 9, "")
Case 2
If $asFolderMatchList = 0 Then Return SetError(1, 9, "")
EndSwitch
Switch $iReturn
Case 2
ReDim $asFolderMatchList[$asFolderMatchList + 1]
$asReturnList = $asFolderMatchList
_RFLTA_ArraySort($asReturnList)
Case 1
If $iReturnPath = 0 Then
_RFLTA_AddFileLists($asReturnList, $asRootFileMatchList, $asFileMatchList)
_RFLTA_ArraySort($asReturnList)
Else
_RFLTA_AddFileLists($asReturnList, $asRootFileMatchList, $asFileMatchList, 1)
EndIf
Case 0
If $iReturnPath = 0 Then
_RFLTA_AddFileLists($asReturnList, $asRootFileMatchList, $asFileMatchList)
$asReturnList += $asFolderMatchList
ReDim $asFolderMatchList[$asFolderMatchList + 1]
_RFLTA_ArrayConcatenate($asReturnList, $asFolderMatchList)
_RFLTA_ArraySort($asReturnList)
Else
Local $asReturnList[$asFileMatchList + $asRootFileMatchList + $asFolderMatchList + 1]
$asReturnList = $asFileMatchList + $asRootFileMatchList + $asFolderMatchList
_RFLTA_ArraySort($asRootFileMatchList, 1, $asRootFileMatchList)
For $i = 1 To $asRootFileMatchList
$asReturnList[$i] = $asRootFileMatchList[$i]
Next
Local $iNextInsertionIndex = $asRootFileMatchList + 1
_RFLTA_ArraySort($asFolderMatchList, 1, $asFolderMatchList)
For $i = 1 To $asFolderMatchList
If $sFolderSlash Then
$sFolderToFind = $asFolderMatchList[$i]
Else
$sFolderToFind = $asFolderMatchList[$i] & "\"
EndIf
For $j = 1 To $asFolderFileSectionList
If $sFolderToFind = $asFolderFileSectionList[$j] Then ExitLoop
Next
$iFileSectionStartIndex = $asFolderFileSectionList[$j]
If $j = $asFolderFileSectionList Then
$iFileSectionEndIndex = $asFileMatchList
Else
$iFileSectionEndIndex = $asFolderFileSectionList[$j + 1] - 1
EndIf
If $iSort = 1 Then
_RFLTA_ArraySort($asFileMatchList, $iFileSectionStartIndex, $iFileSectionEndIndex)
EndIf
$asReturnList[$iNextInsertionIndex] = $asFolderMatchList[$i]
$iNextInsertionIndex += 1
For $j = $iFileSectionStartIndex To $iFileSectionEndIndex
$asReturnList[$iNextInsertionIndex] = $asFileMatchList[$j]
$iNextInsertionIndex += 1
Next
Next
EndIf
EndSwitch
Else
If $asReturnList = 0 Then Return SetError(1, 9, "")
ReDim $asReturnList[$asReturnList + 1]
EndIf
Return $asReturnList
EndFunc ;==>_RecFileListToArray
Func _RFLTA_ListToMask(ByRef $sMask, $sList)
If StringRegExp($sList, "\\|/|:|\<|\>|\|") Then Return 0
$sList = StringReplace(StringStripWS(StringRegExpReplace($sList, "\s*;\s*", ";"), 3), ";", "|")
$sList = StringReplace(StringReplace(StringRegExpReplace($sList, "(\^|\$|\.)", "\\$1"), "?", "."), "*", ".*?")
$sMask = "(?i)^(" & $sList & ")\z"
Return 1
EndFunc ;==>_RFLTA_ListToMask
Func _RFLTA_AddToList(ByRef $aList, $vValue_0, $vValue_1 = -1)
If $vValue_1 = -1 Then
$aList += 1
If UBound($aList) <= $aList Then ReDim $aList
$aList[$aList] = $vValue_0
Else
$aList += 1
If UBound($aList) <= $aList Then ReDim $aList
$aList[$aList] = $vValue_0
$aList[$aList] = $vValue_1
EndIf
EndFunc ;==>_RFLTA_AddToList
Func _RFLTA_AddFileLists(ByRef $asTarget, $asSource_1, $asSource_2, $iSort = 0)
ReDim $asSource_1[$asSource_1 + 1]
If $iSort = 1 Then _RFLTA_ArraySort($asSource_1)
$asTarget = $asSource_1
$asTarget += $asSource_2
ReDim $asSource_2[$asSource_2 + 1]
If $iSort = 1 Then _RFLTA_ArraySort($asSource_2)
_RFLTA_ArrayConcatenate($asTarget, $asSource_2)
EndFunc ;==>_RFLTA_AddFileLists
Func _RFLTA_FileListSearch(Const ByRef $avArray, $vValue, $iIndex, $sSlash)
Local $aRet
If Not $sSlash Then $vValue &= "\"
For $i = $iIndex To $avArray
If StringRegExpReplace($avArray[$i], "(^.*\\)(.*)", "\1") = $vValue Then ExitLoop
Next
If $i > $avArray Then
If $iIndex = $avArray Then $iIndex -= 1
For $i = $iIndex + 1 To 1 Step -1
If StringRegExpReplace($avArray[$i], "(^.*\\)(.*)", "\1") = $vValue Then ExitLoop
Next
If $i = 0 Then Return SetError(1, 0, "")
$aRet = $i
For $i = $aRet To 1 Step -1
If StringRegExpReplace($avArray[$i], "(^.*\\)(.*)", "\1") <> $vValue Then ExitLoop
Next
$aRet = $i + 1
Else
$aRet = $i
For $i = $aRet To $avArray
If StringRegExpReplace($avArray[$i], "(^.*\\)(.*)", "\1") <> $vValue Then ExitLoop
Next
$aRet = $i - 1
EndIf
Return $aRet
EndFunc ;==>_RFLTA_FileListSearch
Func _RFLTA_ArraySort(ByRef $avArray, $iStart = 1, $iEnd = -99)
If $iEnd = -99 Then $iEnd = UBound($avArray) - 1
_RFLTA_QuickSort($avArray, $iStart, $iEnd)
EndFunc ;==>_RFLTA_ArraySort
Func _RFLTA_QuickSort(ByRef $avArray, ByRef $iStart, ByRef $iEnd)
Local $vTmp
If ($iEnd - $iStart) < 15 Then
Local $i, $j, $vCur
For $i = $iStart + 1 To $iEnd
$vTmp = $avArray[$i]
If IsNumber($vTmp) Then
For $j = $i - 1 To $iStart Step -1
$vCur = $avArray[$j]
If ($vTmp >= $vCur And IsNumber($vCur)) Or (Not IsNumber($vCur) And StringCompare($vTmp, $vCur) >= 0) Then ExitLoop
$avArray[$j + 1] = $vCur
Next
Else
For $j = $i - 1 To $iStart Step -1
If (StringCompare($vTmp, $avArray[$j]) >= 0) Then ExitLoop
$avArray[$j + 1] = $avArray[$j]
Next
EndIf
$avArray[$j + 1] = $vTmp
Next
Return
EndIf
Local $L = $iStart, $R = $iEnd, $vPivot = $avArray, $fNum = IsNumber($vPivot)
Do
If $fNum Then
While ($avArray[$L] < $vPivot And IsNumber($avArray[$L])) Or (Not IsNumber($avArray[$L]) And StringCompare($avArray[$L], $vPivot) < 0)
$L += 1
WEnd
While ($avArray[$R] > $vPivot And IsNumber($avArray[$R])) Or (Not IsNumber($avArray[$R]) And StringCompare($avArray[$R], $vPivot) > 0)
$R -= 1
WEnd
Else
While (StringCompare($avArray[$L], $vPivot) < 0)
$L += 1
WEnd
While (StringCompare($avArray[$R], $vPivot) > 0)
$R -= 1
WEnd
EndIf
If $L <= $R Then
$vTmp = $avArray[$L]
$avArray[$L] = $avArray[$R]
$avArray[$R] = $vTmp
$L += 1
$R -= 1
EndIf
Until $L > $R
_RFLTA_QuickSort($avArray, $iStart, $R)
_RFLTA_QuickSort($avArray, $L, $iEnd)
EndFunc ;==>_RFLTA_QuickSort
Func _RFLTA_ArrayConcatenate(ByRef $avArrayTarget, Const ByRef $avArraySource)
Local $iUBoundTarget = UBound($avArrayTarget) - 1, $iUBoundSource = UBound($avArraySource)
ReDim $avArrayTarget[$iUBoundTarget + $iUBoundSource]
For $i = 1 To $iUBoundSource - 1
$avArrayTarget[$iUBoundTarget + $i] = $avArraySource[$i]
Next
EndFunc ;==>_RFLTA_ArrayConcatenate
本帖最后由 夜猫猫 于 2011-7-21 17:12 编辑
:face (13):不能排除已经有的.
Local $jg =""
For $i = 0 To _GUICtrlListView_GetItemCount($ListView)
$P=IniReadSectionNames(@ScriptDir&"\网络游戏.ini")
$M=_GUICtrlListView_GetItemText($ListView, $i, 1)
$N=_GUICtrlListView_GetItemText($ListView, $i, 2)
If _GUICtrlListView_GetItemChecked(GUICtrlGetHandle($ListView), $i) = $GUI_CHECKED Then
If StringInStr($M, $P) Then
ContinueLoop
Else
$jg &="["& $M &"]"&@CRLF&"执行程序="& $N& @CRLF
EndIf
EndIf
Next
FileWrite(@ScriptDir&"\log.ini", $jg)
MsgBox(0, '勾选的项目', $jg)
学习了,各位,顺便留名 回复 12# 夜猫猫
你还是直接说要求,这样说来说去,搞得谁也不明白到底是要什么,好像除了你自己清楚最后的结果,都在猜着帮你想解决方法 {:1_236:}....基本已经好了.但单条信息写入INI里我能做的到.多条信息写入对比搞不来.
使用ContinueLoop 还是Select...Case... EndSelect来判断.
最好能给个列子.
如果我想偷懒.还不如找人帮我写个.只是边学边写,不懂地方太多了
{:1_229:}