Skip to content

Instantly share code, notes, and snippets.

@jasondavis
Forked from G33kDude/Array_Gui.ahk
Created January 25, 2018 19:34
Show Gist options
  • Save jasondavis/3e2ea81548aa0af7dbfa8a553aa758ab to your computer and use it in GitHub Desktop.
Save jasondavis/3e2ea81548aa0af7dbfa8a553aa758ab to your computer and use it in GitHub Desktop.
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