定义一个二维数组,可在创建 Item 时同时填充#include <Array.au3>
GUICreate("列表视图 - 项目", 800, 500, -1, 180) ;, -1, $WS_EX_ACCEPTFILES)
GUISetBkColor(0x00E0FFFF) ; 将改变背景颜色
Local $idListview = GUICtrlCreateListView("关键字|--------命令---------|-----参数-----|----起始位置----|-|-|-|-| 备注 |打开方式", 10, 10, 780, 450);,$LVS_SORTDESCENDING)
Local $sIni = FileRead(@ScriptDir & '\1.ini')
$sIni = StringRegExpReplace($sIni, '(?mi)[\s\S]*?^\h*\[FastStart\]\V*\v+([\s\S]+?)(?=\r\n\h*\[|\z)[\s\S]*', '\1')
Local $aLine = StringRegExp($sIni, '\V+', 3)
Local $i, $afg, $j
If Not @error Then
Local $aData[UBound($aLine)][10]
For $i = 0 To UBound($aLine) - 1
GUICtrlCreateListViewItem($aLine[$i], $idListview)
$afg = StringSplit($aLine[$i], '|', 1)
For $j = 1 To $afg[0]
$aData[$i][$j - 1] = $afg[$j]
Next
Next
EndIf
_ArrayDisplay($aData, '')
GUISetState(@SW_SHOW)
While 1
Switch GUIGetMsg()
Case -3
ExitLoop
EndSwitch
WEnd
|