#include #include #include Dim $e, $i, $var, $file, $TreeView, $TreeView1, $var2, $TreeView2 Dim $TreeView3, $test1, $varx Dim $var, $file, $x $file = @ScriptDir & "\imige_file_data2.ini" ;If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000 GuiCreate("Form2", 420, 331, 430,346 ,BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $TreeView1 = GUICtrlCreateTreeView(16, 16, 353, 217) ;_IniReadInfo() _IniGetSectionNames() GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exit Func _IniGetSectionNames() $varx = IniReadSectionNames($file) If @error Then MsgBox(4096, "", "Error occured, probably no INI file.") Else For $x = 1 To $varx[0] ;MsgBox(4096, "", $varx[$x]) _IniReadInfo($varx[$x]) Next EndIf EndFunc Func _IniReadInfo($sSection) Dim $sValue $var = IniReadSection($file, $sSection) If @error Then MsgBox(4096, "", "Error occured, probably no INI file.") Else $TreeView2 = GUICtrlCreateTreeViewitem($sSection, $TreeView1) For $i = 1 To $var[0][0] $TreeView3 = GUICtrlCreateTreeViewItem($var[$i][0], $TreeView2) $sValue = StringSplit($var[$i][1], '|') For $x = 1 To $sValue[0] if $sValue[$x] <> '' Then $TreeView4 = GUICtrlCreateTreeViewitem($sValue[$x], $TreeView3) Next Next EndIf EndFunc