Just tried a sub and it's do-able...messy but, doable. It would be nice if they added a "*.Name" namespace for states.
Here's what I did. On a simple image object I created five states named "state1"(up to 5).
Then I looped through them to verify if they existed. Obviously, you must likely would put this data into an array after running the sub or function.
Code: vbscript
- Sub Object_OnScriptEnter
- Call IterateStates
- End Sub
- Sub IterateStates
- sActiveState=Object.State
- For x=1 To 5
- strState="state"&x
- 'x=Object.State(strState)
- If Object.States(strState).Picture "" Then
- If sActiveState=strState Then
- oList=oList&"Active: "&strState&vbnewline
- Else
- oList=oList&strState &vbnewline
- End If
- End If
- Next
- msgbox oList
- End Sub