GetPropertyValue In VBScript

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
spike5884
Senior Member
Posts: 129
Joined: Thu Aug 26, 2004 8:08 am
Location: WI

GetPropertyValue In VBScript

Post by spike5884 »

Below is a code sniplet from the script I am trying to run.

Here are my thoughts: A Task sets the CameraToActivate property in the CamActivate Null Device. This value is the same as the name of the Script Device. The Task then starts the Script Device. Basically I am trying to have the one generic script defined in multiple Script Devices.


Code: Select all

Camera = GetPropertyValue("CamActivate.CameraToActivate")
Outpath = GetPropertyValue(Trim(Camera) & ".OutputPath")


Is this possible?? Right now I am getting a syntax error during the compile. I am hoping it is just that I don't have the right syntax.



Thanks,

Scott J.
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Scott,



I'm not sure what GetPropertyValue(Trim(Camera) & ".OutputPath") is trying to do. I don't think you want to append ".OutputPath" to the name of the Property Value you are trying to get. Maybe GetPropertyValue(Trim(Camera) ) & ".OutputPath" is what you want? I'm not sure why you want to append the ".OutputPath" string either.
Scott
spike5884
Senior Member
Posts: 129
Joined: Thu Aug 26, 2004 8:08 am
Location: WI

Post by spike5884 »

Never mind.. :oops: My bad. I was looking at the syntax error wrong. Fixed that and all is well again. :P



Thanks,

Scott J
Post Reply