#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#Include <GuiStatusBar.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>
#include <WinAPI.au3>
#include <ListViewConstants.au3>
$Form_main = GUICreate("", 530, 520, -1, -1)
$Form_main = GUICreate("", 530, 520, -1, -1)
;GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")
Local $idListview = GUICtrlCreateListView("", 50, 100, 430, 200,-1, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES))
_GUICtrlListView_AddColumn($idListview, "", 40, 2)
_GUICtrlListView_AddColumn($idListview, " 映像文件", 160, 2)
_GUICtrlListView_AddColumn($idListview, "卷号", 40, 2)
_GUICtrlListView_AddColumn($idListview, " 名称", 140, 2)
_GUICtrlListView_AddColumn($idListview, "描述", 50, 2)
_GUICtrlListView_AddColumn($idListview, "系统标志", 50, 2)
$Handle = GUICtrlGetHandle(-1)
$Button1 = GUICtrlCreateButton("添加文件", 208, 402, 73, 33)
GUISetState(@SW_SHOW, $Form_main)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
Case $Button1
wimlibinfo()
EndSwitch
WEnd
Func wimlibinfo()
Local $sMountInfo = @ScriptDir&"\MountInfo.txt"
$MountTxt = FileRead($sMountInfo)
Local $Index = StringRegExp($MountTxt, 'Index:(\V+)', 3)
Local $Filepath = StringRegExp($MountTxt, 'Path: (\V+)', 3)
Local $imagename=StringRegExp($MountTxt, '(?m)^Name:(\V+)', 3)
Local $imageDescription=StringRegExp($MountTxt, 'Description: (\V+)', 3)
Local $imageFlags=StringRegExp($MountTxt, 'Flags: (\V+)', 3)
For $i = 0 To UBound($imagename) -1
GUICtrlCreateListViewItem(""&"|"& $Filepath[0] &"|"&$Index[$i+1]&"|"&$imagename[$i]&"|"&$imageDescription[$i]&"|"& $imageFlags[$i],$idListview)
Next
EndFunc
|