Highlighted

transform text value in object

New Here ,
Mar 28, 2017

Copy link to clipboard

Copied

Hi everyone !

Here is a trickie one : I made a script to get the keys property by property in a layer. If I enter a full property name by hand like this

myProp = app.project.item(55).layer("titre").property("Transform").property("Position");

alert(myProp.numKeys);

It gives me the number of keys on my property... But, if I get the exact same property path by another way (text file, script...) it doesn't work anymore.

myProp = myTextFileDataArray; //the exact property path is entered in the text file

alert(myProp[0].numKeys);

Returns "undefined".

My program has to scan all the layers and properties in a comp, so I need to have a myProp value dynamically.

Hope my ask is clear 😕

TOPICS
Scripting

Views

111

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

transform text value in object

New Here ,
Mar 28, 2017

Copy link to clipboard

Copied

Hi everyone !

Here is a trickie one : I made a script to get the keys property by property in a layer. If I enter a full property name by hand like this

myProp = app.project.item(55).layer("titre").property("Transform").property("Position");

alert(myProp.numKeys);

It gives me the number of keys on my property... But, if I get the exact same property path by another way (text file, script...) it doesn't work anymore.

myProp = myTextFileDataArray; //the exact property path is entered in the text file

alert(myProp[0].numKeys);

Returns "undefined".

My program has to scan all the layers and properties in a comp, so I need to have a myProp value dynamically.

Hope my ask is clear 😕

TOPICS
Scripting

Views

112

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Mar 28, 2017 0
Advocate ,
Mar 28, 2017

Copy link to clipboard

Copied

Hello Alfred,

From your code I guess you misplaced the question - there is not (yet) a "project" object in FrameMaker, nor does there seem to be a "layer" and a "transform". My guess is this question should be posted to an Illustrator or InDesign scripting forum.

Good luck

Jang

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 28, 2017 0
New Here ,
Mar 28, 2017

Copy link to clipboard

Copied

Indeed, I don't know why I'm here... I was suppose to post it in After Effects discussion...

Thank you

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 28, 2017 0