• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

adding an expression to the script

New Here ,
Jul 19, 2019 Jul 19, 2019

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 ???

TOPICS
Scripting

Views

296

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
community guidelines

correct answers 1 Correct answer

Enthusiast , Jul 19, 2019 Jul 19, 2019

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");';

Votes

Translate

Translate
Enthusiast ,
Jul 19, 2019 Jul 19, 2019

Copy link to clipboard

Copied

LATEST

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");';

Votes

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
community guidelines