After Effects - Command line script invocation does not work












0















I am on Windows 10 build 1809 and using AE 16.0.1 build 48. I am new to scripting but not new to AE.



I have a script that I am able to run successfully from File --> Scripts menu. But when I run the same script using the command line, it does not work. This is what I use to invoke the script:



"C:Program FilesAdobeAdobe After Effects CC 2019Support FilesAfterFX.exe" -r "C:UsersAMSDesktoptestscriptsAE Duplicate Layer.jsx"


You can see that I am providing the full pathname for the script. I tried running the Windows CMD terminal as admin, but didn't help.



The script is not even being called. I know this because it has an alert call in it as the first statement, and it is not executing.



The script is pretty simple, it rotates a shape by 45 degrees in a loop, 10 times:



alert("You just sent an alert to After Effects");

var myComp = app.project.activeItem;

var myLayer = myComp.layer(1);

var myCounter = 1;

while (myCounter <= 10) {
var dupLayer = myLayer.duplicate();
dupLayer.rotation.setValue(myCounter*45);
myCounter = myCounter + 1;
}


I also have enabled the option "Allows scripts to write files and access network".



What could be wrong here?










share|improve this question





























    0















    I am on Windows 10 build 1809 and using AE 16.0.1 build 48. I am new to scripting but not new to AE.



    I have a script that I am able to run successfully from File --> Scripts menu. But when I run the same script using the command line, it does not work. This is what I use to invoke the script:



    "C:Program FilesAdobeAdobe After Effects CC 2019Support FilesAfterFX.exe" -r "C:UsersAMSDesktoptestscriptsAE Duplicate Layer.jsx"


    You can see that I am providing the full pathname for the script. I tried running the Windows CMD terminal as admin, but didn't help.



    The script is not even being called. I know this because it has an alert call in it as the first statement, and it is not executing.



    The script is pretty simple, it rotates a shape by 45 degrees in a loop, 10 times:



    alert("You just sent an alert to After Effects");

    var myComp = app.project.activeItem;

    var myLayer = myComp.layer(1);

    var myCounter = 1;

    while (myCounter <= 10) {
    var dupLayer = myLayer.duplicate();
    dupLayer.rotation.setValue(myCounter*45);
    myCounter = myCounter + 1;
    }


    I also have enabled the option "Allows scripts to write files and access network".



    What could be wrong here?










    share|improve this question



























      0












      0








      0








      I am on Windows 10 build 1809 and using AE 16.0.1 build 48. I am new to scripting but not new to AE.



      I have a script that I am able to run successfully from File --> Scripts menu. But when I run the same script using the command line, it does not work. This is what I use to invoke the script:



      "C:Program FilesAdobeAdobe After Effects CC 2019Support FilesAfterFX.exe" -r "C:UsersAMSDesktoptestscriptsAE Duplicate Layer.jsx"


      You can see that I am providing the full pathname for the script. I tried running the Windows CMD terminal as admin, but didn't help.



      The script is not even being called. I know this because it has an alert call in it as the first statement, and it is not executing.



      The script is pretty simple, it rotates a shape by 45 degrees in a loop, 10 times:



      alert("You just sent an alert to After Effects");

      var myComp = app.project.activeItem;

      var myLayer = myComp.layer(1);

      var myCounter = 1;

      while (myCounter <= 10) {
      var dupLayer = myLayer.duplicate();
      dupLayer.rotation.setValue(myCounter*45);
      myCounter = myCounter + 1;
      }


      I also have enabled the option "Allows scripts to write files and access network".



      What could be wrong here?










      share|improve this question
















      I am on Windows 10 build 1809 and using AE 16.0.1 build 48. I am new to scripting but not new to AE.



      I have a script that I am able to run successfully from File --> Scripts menu. But when I run the same script using the command line, it does not work. This is what I use to invoke the script:



      "C:Program FilesAdobeAdobe After Effects CC 2019Support FilesAfterFX.exe" -r "C:UsersAMSDesktoptestscriptsAE Duplicate Layer.jsx"


      You can see that I am providing the full pathname for the script. I tried running the Windows CMD terminal as admin, but didn't help.



      The script is not even being called. I know this because it has an alert call in it as the first statement, and it is not executing.



      The script is pretty simple, it rotates a shape by 45 degrees in a loop, 10 times:



      alert("You just sent an alert to After Effects");

      var myComp = app.project.activeItem;

      var myLayer = myComp.layer(1);

      var myCounter = 1;

      while (myCounter <= 10) {
      var dupLayer = myLayer.duplicate();
      dupLayer.rotation.setValue(myCounter*45);
      myCounter = myCounter + 1;
      }


      I also have enabled the option "Allows scripts to write files and access network".



      What could be wrong here?







      script adobe-after-effects






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 27 at 23:19







      Sabuncu

















      asked Feb 27 at 17:44









      SabuncuSabuncu

      2071818




      2071818






















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1409943%2fafter-effects-command-line-script-invocation-does-not-work%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1409943%2fafter-effects-command-line-script-invocation-does-not-work%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Probability when a professor distributes a quiz and homework assignment to a class of n students.

          Aardman Animations

          Are they similar matrix