DXScript has support for these object collections:
- DesktopX.Objects
- DesktopX.GroupObjects(“groupname”)
- Object.Children
They can be used like this:
- DesktopX.Objects.count – number of objects in the collection
- DesktopX.Objects.item(“obj1”) – returns the Object namespace of “obj1”
- DesktopX.Objects.item(3) – returns the Object namespace of the third object in
the collection
You can also use the VB Sript For Each method as shown in the
following examples:
For Each elem In DesktopX.Objects
msgbox "First object name:" & elem.name
elem.left = 50
'etc
Next
Simply put the returned item is identical to the references returned by
DesktopX.Object("name"), NOT DesktopX.ScriptObject("name"). You can always do
DesktopX.ScriptObject(elem.name) if you need.
DesktopX.GroupObjects(“groupname”) and Object.Children collections work in a
similar way.