Need help with Object.Children.item(x)
according to https://www.stardock.com/products/desktopx/help/dev_guide_3a_scripting.htm
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
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.
so if DesktopX.Objects.item(3) works (and it does i have used it with success) then Object.Children.item(3) would work the same way right?
Sub Object_OnTimer1
DesktopX.ScriptObject( Object.Children.item(activeIcon).name ).Animate(elapsedTime) <<--- !! the issue i have in in this line !!
elapsedTime = elapsedTime+1
activeIcon = activeIcon+1
End Sub
i get the error
Object required: 'Object.Children.item(...)'
Line: 30
Code:
(not available)
and i got the same error trying DesktopX.GroupObjects(“groupname”).item(X). However the code below using Object.Children works fine and is in the same script.
For Each icon In Object.Children
DesktopX.ScriptObject(icon.name).StartAnimation()
Next
SetTimer 1, frequency
anyone know what i have done wrong or how i could fix it?