Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

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


  • Please log in to reply
4 replies to this topic
shajul
  • Members
  • 571 posts
  • Last active: Aug 01 2015 03:45 PM
  • Joined: 15 Sep 2006
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

If i've seen further it is by standing on the shoulders of giants

my site | ~shajul | WYSIWYG BBCode Editor

trueski
  • Members
  • 121 posts
  • Last active: Jun 25 2014 09:12 PM
  • Joined: 08 Apr 2008
Does anyone have this file saved? Like many other files, it's missing from AutoHotkey.net
-trueski-

shajul
  • Members
  • 571 posts
  • Last active: Aug 01 2015 03:45 PM
  • Joined: 15 Sep 2006
I have restored the files :) . HTH
If i've seen further it is by standing on the shoulders of giants

my site | ~shajul | WYSIWYG BBCode Editor

trueski
  • Members
  • 121 posts
  • Last active: Jun 25 2014 09:12 PM
  • Joined: 08 Apr 2008
Thanks!
-trueski-

szujeq
  • Members
  • 304 posts
  • Last active: Jan 12 2017 09:11 PM
  • Joined: 28 Mar 2011

Its only thing that I need for debugging my script.

Just AMAZING.