Rik's Treehouse > Babbling in Binary > My Software > Orphanware > R2DToo > R2DToo Help > Automation > GetState

GetState

Declaration
Parameters
Return Value
Example
See Also

Declaration

object.GetState(x,y,name)
Top of page

Parameters

object
Required. Always the name of a R2DToo.FrontEnd object.
x,y
Required. Coordinates of agent.
name
Required. The name of an agent state variable (case insensitive).
Top of page

Return Value

A character string returning the value of the named state variable for the agent at (x,y). If the state is not found or x or y are out of range, returns an empty string, "". Top of page

Example

' [VBScript] ' load Dim R2DToo Set R2DToo = Wscript.CreateObject("R2DToo.FrontEnd") ' demonstrate method WScript.Echo "alive(5,12) = " & R2DToo.GetState(5,12,"alive") ' unload Set R2DToo = nothing
Top of page

See Also

SetState.
Top of page
[Rik's Office Hours] [Contact Rik]
Last updated: Fri Apr 30 2004, 1:46pm