Copy link to clipboard
Copied
Good afternoon
Trying to add expression to script.
String that causes an error
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
app.project.item(7).layer(1).property("ADBE Effect Parade").property("Stonetics Alpha Feather")("Stonetics Alpha Feather-0001").expression = "comp("ClBG").layer("Null 1")("ADBE Effect Parade")("ADBE Slider Control")("ADBE Slider Control-0001");";
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
echo Expected: ;
If you write
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
app.project.item(7).layer(1).property("ADBE Effect Parade").property("Stonetics Alpha Feather")("Stonetics Alpha Feather-0001").expression = "5;";
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
the all marks normally
If you write as expression, in app.project.item(7).layer(1).property("ADBE Effect Parade").property("Stonetics Alpha Feather")("Stonetics Alpha Feather-0001")
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
comp("ClBG").layer("Null 1")("ADBE Effect Parade")("ADBE Slider Control")("ADBE Slider Control-0001")
--------------------------------------------------------------------------------------------------------------------------------------------------------------
the all marks normally...
Can someone explain why ???
As your expression string contains double quotes you can't wrap the string in double quotes (the string is interpreted as being "comp(" then the rest will produce syntax errors), best to use single quotes in this case. So...
app.project.item(7).layer(1).property("ADBE Effect Parade").property("Stonetics Alpha Feather")("Stonetics Alpha Feather-0001").expression = 'comp("ClBG").layer("Null 1")("ADBE Effect Parade")("ADBE Slider Control")("ADBE Slider Control-0001");';
Copy link to clipboard
Copied
As your expression string contains double quotes you can't wrap the string in double quotes (the string is interpreted as being "comp(" then the rest will produce syntax errors), best to use single quotes in this case. So...
app.project.item(7).layer(1).property("ADBE Effect Parade").property("Stonetics Alpha Feather")("Stonetics Alpha Feather-0001").expression = 'comp("ClBG").layer("Null 1")("ADBE Effect Parade")("ADBE Slider Control")("ADBE Slider Control-0001");';