Forum Replies Created

Page 2 of 3
  • Thank you! This works perfectly, but is there any way to just duplicate it one time? I don’t want to duplicate everytime i press the button, something like “if this layer has Vector Groups with Stroke 1 and Stroke 2 then DON’T duplicate strokes”?

  • Hello Andrei, thanks for your reply, unfortunately i’m still getting the same result (nothing happens), i don’t know if there’s a different approach to this, i want to duplicate the stroke of any selected layer (for every vector group) and then change the color of each stroke (assign 1 color to stroke 1 and another color to stroke 2).

  • Vincenzo Imbimbo

    September 2, 2022 at 12:20 pm in reply to: Tutorial rolling circles onto the screen

    This is freaking amazing!! Thank you so much, this will save me tons of time.

  • Thanks for your reply Andrei, unfortunately my script keeps having the same bug, I was hoping I wouldn’t have to rebuild everything from scratch but I’ll take a look at that ScriptUI Dialog Builder, thank you!!

  • I figured it out with this:

    var durationIn = myLayers[i].Effects("ADBE Slider Control")

    ? myLayers[i].Effects("ADBE Slider Control")

    : myLayers[i].Effects.addProperty("ADBE Slider Control");

    durationIn.name = "IN";

    var durationOut = myLayers[i].Effects("ADBE Slider Control")

    ? myLayers[i].Effects("ADBE Slider Control")

    : myLayers[i].Effects.addProperty("ADBE Slider Control");

    durationOut.name = "OUT";

    But the problem is that the ternary operator just read if the layer has a “Slider Control” and i need it to be specific with “IN” and “OUT” sliders. Sorry for asking so much questions, i’m really newbie with JS.

  • Is there any way to apply the same Ternary Operator to this line of code?

    var durationIn = myLayers[i].Effects.addProperty(“ADBE Slider Control”);

    durationIn.name = “IN”;

    I want to add to each selected layer a slider control named “IN” but if i run the script again i don’t want to add another slider control named “IN”, i just want to overwrite the value of that slider with a new input. Can you help me? Thanks again!

  • Oh nevermind, it was the “;” that i was keeping at the end of “var myTrim…” so the ternary operator was missing the condition, but now is working perfectly, thank you so much!!

  • Hi again Andrei, thank you for your reply, i tried the code but i’m getting a syntax error saying that “?” doesn’t have an assigned value. What i am missing?

  • Thank you Andrei!! This is what i need it, but there’s a little problem, if i execute the script again it will add another Trim Paths to each selected layer, i just want to have 1 Trim Path, no matter how many times i execute the script, any way to fix this? Something like “if this shape layer already has a trim path then don’t add a trim paths”, thank you!

  • Thank you Dan, it works perfectly!

Page 2 of 3

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy