Last active
September 22, 2024 14:10
-
-
Save G33kDude/47f97ed521330820e7419591601de01f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array_Gui(Array, Parent="") { | |
if !Parent | |
{ | |
Gui, +HwndDefault | |
Gui, New, +HwndGuiArray +LabelGuiArray +Resize | |
Gui, Margin, 5, 5 | |
Gui, Add, TreeView, w300 h200 | |
Item := TV_Add("Array", 0, "+Expand") | |
Array_Gui(Array, Item) | |
Gui, Show,, GuiArray | |
Gui, %Default%:Default | |
WinWait, ahk_id%GuiArray% | |
WinWaitClose, ahk_id%GuiArray% | |
return | |
} | |
For Key, Value in Array | |
{ | |
Item := TV_Add(Key, Parent) | |
if (IsObject(Value)) | |
Array_Gui(Value, Item) | |
else | |
TV_Add(Value, Item) | |
} | |
return | |
GuiArrayClose: | |
Gui, Destroy | |
return | |
GuiArraySize: | |
GuiControl, Move, SysTreeView321, % "w" A_GuiWidth - 10 " h" A_GuiHeight - 10 | |
return | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment