Announcement

Collapse
No announcement yet.

Make a button to run a Script in adobe after effects ( like command line)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Make a button to run a Script in adobe after effects ( like command line)

    Hi

    I Tried to make a button to run a script inside after effects but failed, I can run a script JSX file inside after effects by command line this way :

    Code:
    C:\Users\user>cd C:\Program Files\Adobe\Adobe After Effects 2023\Support Files\
    
    C:\Program Files\Adobe\Adobe After Effects 2023\Support Files>afterfx -r "C:\Users\user\Dropbox\AE Scripts\G3A Camera Template\Import Studio Template.jsx"​
    I read the manual to find a way to do it, i found File.run action but didnt manage to make it work and i searched the forum but cant find a proper way.

    Is there a way to do it ?

    Thanks

  • #2
    File.Run(_SystemFolder.."\\cmd.exe","/c afterfx -r C:\Users\user\Dropbox\AE Scripts\G3A Camera Template\Import Studio Template.jsx","",SW_HIDE)
    i'm not sure but maybe you can try this.

    Comment


    • #3
      Hi droxcinco , thanks for the help but it didnt work i tried the same code before.

      Comment


      • #4
        Is it anything to do with the flag you're using?
        The -s flag is used for inlined JavaScript, the -r flag is for JavaScript files.
        There is also the -noui flag but not showing the UI for this isn't really going to make much difference I'd have thought.
        Overall though the actual command line text looks good, it's all absolute references rather than relative. The only thing is the users\user\foldername part, unless your user name on the PC is 'user' of course but I'd expect it to be something else??

        Comment


        • #5
          Nickj I tried all these possibilities , im missing something but i do not know it

          Comment


          • #6
            Originally posted by droxcinco View Post
            File.Run(_SystemFolder.."\\cmd.exe","/c afterfx -r C:\Users\user\Dropbox\AE Scripts\G3A Camera Template\Import Studio Template.jsx","",SW_HIDE)
            i'm not sure but maybe you can try this.
            Now I confess to knowing very little and this is probably wrong but have you tried putting double back slash on the command

            "C:\\Users\\user\\Dropbox\\AE Scripts\G3A"

            Just a thought, I made a nice little checksum calculator and had to put the double back slash in my command to make it work.
            Probably not right but worth a go for nowt ?

            Comment


            • #7
              Originally posted by Old Fellow View Post

              Now I confess to knowing very little and this is probably wrong but have you tried putting double back slash on the command

              "C:\\Users\\user\\Dropbox\\AE Scripts\G3A"

              Just a thought, I made a nice little checksum calculator and had to put the double back slash in my command to make it work.
              Probably not right but worth a go for nowt ?
              yes your right i forgot to put the double slash i'm a beginner in ams usually i combine ams with batch cmd.

              Comment


              • #8
                Hi all

                I managed to make it work like this, without calling cmd, you can give order to after effects directly :

                Code:
                File.Run("C:\\Program Files\\Adobe\\Adobe After Effects 2023\\Support Files\\AfterFX.exe", "-r C:\\Users\\user\\Dropbox\\AE_Scripts\\Import_Studio_Template.jsx", "", SW_HIDE)
                - Back slash is important
                - The path string has to be without spaces

                Thanks guys for the great help

                Comment

                Working...
                X
                😀
                🥰
                🤢
                😎
                😡
                👍
                👎