Your DesktopX Documentation Resource Guide

Documentation Home

Quick Start

User's Guide

Developer's Guide

Resources

Tutorials


By now you should realize just w

Enumerators

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:

msgbox "Total objects:" & DesktopX.Objects.count
msgbox "First object name:" & DesktopX.Objects.item(1).name ' or .left or .ontop etc
msgbox "Test1 object name:" & DesktopX.Objects.item("Test1").name

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.
 


6/30 

Stardock prepares major update for Sins of a Solar Empire through an open beta

6/27 

Stardock releases first update to The Political Machine

6/26 

Epic Carnage Arrives with the Unreal Series

6/24 

Discover the Truth in Belief & Betrayal

6/23 

Conquer Germania for the Glory of Rome!

6/17 

The Political Machine 2008 Now Available

6/17 

Stardock Launches Impulse: The PC's Next-Generation Distribution Platform

6/5 

Conquer Britannia in the First Imperium Romanum Booster