-
-
Save jasondavis/3e2ea81548aa0af7dbfa8a553aa758ab 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