-
Scripting Question
Trying to move up to scripting, and this is the closest forum I can find on the cow. I have seen something like this is a few scripts, and there is an example in the javascript tools guide for CS3. Essentially, the code is using a string as an array index. I’m not sure how this works. I’m thinking it is not a true array, so any insight is appreciated. Here is a code snippet which shows the values of all the properties of an object:
var f = new File ("myfile");
var props = f.reflect.properties;
for (var i = 0; i < props.length; i++) { $.writeln('this property ' + props[i].name + ' is ' + f[props[i].name]); }How does the f[props[i].name] get decoded? props[i].name is a string. Is this some alternate method to access object properties? Like if props[i].name = "path", then this will output f.path? That's what it implies to be doing, but I haven't seen this specifically addressed.
Thanks,
Pauley