Jump to content


Photo

List Arrays/Objects easily (GUI) [Lib] [AHK_L]


  • Please log in to reply
4 replies to this topic

#1 shajul

shajul
  • Members
  • 571 posts

Posted 20 February 2011 - 06:03 AM

Array_List() Function

GUI for showing contents of an associative array (object) easily. Psuedo-arrays are not (yet) supported.
Now that assoc arrays as objects are supported, this provides an easy way to display all data of an object by simply passing the object as a parameter to this function. Standard Library compatible.

Lot of scope for improvement. Any improvements/suggestions welcome.

Features:
* Listing of arrays inside array also
* Gui, font and behavior options can be setScreenshot:
Posted Image

Download | Documentation

Example
objShell := ComObjCreate("Shell.Application") 
objFolder := objShell.Namespace(A_ScriptDir . "\") 
objFilename := objFolder.Parsename(A_ScriptName)

oDetails := Object()
Loop {
  iAttribute := objFolder.GetDetailsOf(objFolder.Items, A_Index)
  if (iValue := objFolder.GetDetailsOf(objFilename, A_Index)) ;only add attribs with values
    oDetails[iAttribute] := iValue
} Until iAttribute = ""

alphabet := Object() ;sub-object
Loop 26
  alphabet[A_Index] := Chr(64+A_Index)

alphabet_s := Object() ;sub-sub-object
Loop 26
  alphabet_s[A_Index] := Chr(96+A_Index)

alphabet.alphabet_s := alphabet_s
oDetails.alphabet := alphabet

;--- Double-click an object entry to get that objects array
array_list(oDetails)
;--- You can set options also
array_list(oDetails,"Font=s12:Arial, GuiOptions=+AlwaysOnTop -Sysmenu, GuiShowOptions=w500 h300 center")
ExitApp

#Include Array.ahk  ;uncomment if not in Lib


#2 trueski

trueski
  • Members
  • 121 posts

Posted 27 September 2012 - 07:09 PM

Does anyone have this file saved? Like many other files, it's missing from AutoHotkey.net

#3 shajul

shajul
  • Members
  • 571 posts

Posted 28 September 2012 - 05:32 AM

I have restored the files :) . HTH

#4 trueski

trueski
  • Members
  • 121 posts

Posted 29 September 2012 - 06:45 PM

Thanks!

#5 szujeq

szujeq
  • Members
  • 169 posts

Posted 02 February 2013 - 06:32 AM

Its only thing that I need for debugging my script.

Just AMAZING.