Execute script from AfterFX command line

Hello all
I'm trying to run a script from the AfterFX.exe command line and I get a message: "Unable to execute script at line 1. Syntax error"
If I run the same script file from the AE Script Editor, it works perfectly
Here is the command line I'm using:
"C:\Program Files\Adobe\Adobe After Effects CS6\Support Files\AfterFX.exe" -noui -s "D:\Product\Watermark\Rendering\WatermarkedSecuritySample.jsx"
Anyone have an idea of what can cause this error? I've tried running the script directly in the command line like
"C:\Program Files\Adobe\Adobe After Effects CS6\Support Files\AfterFX.exe" -noui -s "alert('1')"
and it works fine for short script but mine is way to big to do that
As you can probably guess with the "Watermark" and "Security" in the filename, I cannot post the script file here, all I can say is that the line 1 is:
var projectName = "D:\\Product\\WatermarkTemplate.aep";
I've tried to replace the entire script with "alert('1');" and it cause the same error when running it from the command line
Also, if anyone know where I can find the AfterFX.exe command line arguments description, I would be very happy.. everybody talks about aerender.exe but I need thoses options for AfterFX.exe
Thanks for your help

Have you tried to use "-r" instead of "-s"?
(argument for "-s" is a script; and argument for "-r" is a path to script)

Similar Messages

  • How to execute SAPGUI script from the command line?

    I have created a script and would like to execute it from the command line. There must be some flag that goes with SAPGUI.EXE. Any help appreciated.
    Thanks,
    Jeff

    Hi Jeff,
    the best way to do this is to run the script using the Windows Script Host, for example like this:
    cscript myscript.vbs
    This will execute the script which in turn can access SAP GUI. You may however have to make sure the script attaches to the correct session.
    Best regards,
    Christian

  • Calling an ExtendScript script from the command line

    Hi! I can call an ExtendScript script from a command line just by using its path, but is there a way to pass parameters to the script? Thanks. -Rick

    Hi Rick,
    Well, a scan of the documentation certainly provides no evidence of this capability. If it exists, someone else will have to fill us in.
    I did have an idea, although it's a bit of a roundabout approach. A windows batch file can accept parameters and can write a text file. So, maybe Mif2Go can call a batch file instead that writes the folder to some file, then runs the script that reads the file. Although, I'm not familiar with a command line call to ES, so I'm not sure that a batch file can launch an ES script too. If not, can Mif2Go make more than one command line call?
    Russ

  • Executing Preview from a command line

    Colleagues,
    I have multi-page PDF documents (created with R [R-project.org]) from which I convert a single page to TIFF. Is there some means to execute this from a command line? Presumably, I would need arguments for (at least) input file name, output format, and pages.
    Any help would be appreciated.
    Dennis

    I've used it extract pict bitmaps from pdf screen shots in 10.3.9:
    <pre style="border: 1px solid #ddd; padding-left: .75ex; padding-top: .25em; padding-bottom: .25em; margin-top: .5em; margin-bottom: .5em; margin-left: 1ex; max-width: 60ex; overflow: auto; font-size: 10px; font-family: Monaco, 'Courier New', Courier, monospace; color: #444; background: #eee; line-height: normal">sips -s format pict picture.pdf -o picture.pct</pre>
    But in my case I think the pict is embedded in the pdf.
    Cole

  • How to execute sql script from linux command line

    Hello everyone !
    Just short question. On my server I must install script in crontab which will eexecute some sql statements.
    How can I write command which will execute script from file without asking about password ?
    sqlplus user/pass ... and then what ?
    thanks
    dlugasx

    user10064952 wrote:
    Just short question. On my server I must install script in crontab which will eexecute some sql statements.
    How can I write command which will execute script from file without asking about password ?Crontab does not run your local shell profile - which means no valid Oracle environment for SQL*Plus to execute in.
    On newer cron versions, you can add an environment to the crontab file itself that needs to be set before executing the scheduled command.
    Whatever method - make sure you have ORACLE_HOME set, that the path includes ORACLE_HOME/bin, that ORACLE_SID is set (if not using a TNS alias) and so on.
    But I agree with Sybrand... crontab is not the best place for running SQL or PL/SQL code. That should reside in the database as named code (e.g. stored procs) and be executed via DBMS_JOB or DBMS_SCHEDULE.
    Less moving parts that way. No external dependancies. And will work on any Oracle server, irrespective of the o/s used and whether or not the relevant o/s user has batch/cron/etc privs to do the deed.

  • Run Scripts from windows command line

    Hi, We're creating a test enviroment and we need to "rebuild" our Database (Tablespace) from scratch everytime we run a test.
    What we need is to run all scripts files from windows command line, there is any command or application we can use here?
    thanks.
    Fernando.

    Create a scripts.bat file with something like this in it:
    @sqlplus -S username/password@connect @scriptname.sql

  • Running a function from a powershell script from the command line

    Rather than creating several scripts each with one function, I have one script with has several functions.... I would like to call the script and select the function i want to use from the command line.
    so far, if i change directory to that of the script i can call the function by doing this:
    cd c:\myscripts
    . .\mytestscript.ps1; myfunction
    this works fine.... i have also tried, what I would like to achieve is calling it like this
    c:\myscripts\mytestscript.ps1; myfunction
    however, i am trying to run this as part of an MDT task sequence, my command line looks like this and using the ; myfunction at the end doesn't work.
    powershell.exe -ExecutionPolicy Bypass %SCRIPTROOT%\CustomScripts\mytestscript.ps1; myfunction
    how can i adapt my command line so that it will successfully call the function within my script?
    thanks
    Steve

    Rename the file from ps1 to psm1 and create a powershell module that contain multiple functions. A module will autoload like the built-in modules.
    Placement of the psm1 file is important for Powershell to find and autoload it.
    The file name and folder name must be the same, for example MyModule.psm1 should be in the folder:
    user\documents\windowspowershell\modules\mymodule
    Windows PowerShell Modules
    http://msdn.microsoft.com/en-us/library/dd878324(v=vs.85).aspx
    PS C:\> get-childItem env:PSModulePath
    Name Value
    PSModulePath C:\Users\User\Documents\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules\

  • Is there a way to generate job execution scripts from the command line?

    The customer is planning to change DI production server configuraiton and needs to regenerate job execution scripts for hundreds of jobs. Their question is - instead of going through web admin and doing it one by one, is there a way to run a batch command and generate all jobs with the same job server information from one repository? I looked at the "al_engine" command but didn't find the options to do so. Did I miss something? This is for a DI 11.5.3 on HPUX.
    Thanks,
    Larry

    I also suggested that but the customer was so afraid of messing things up that they wanted to find out if there is another way. Thanks a lot for the confirmation.
    Larry

  • Is there a way to switch between workspaces in Spaces from the command line?  I want to write a script to set up certain applications in certain workspaces (without having to do it manually each time)...

    Is there a way to switch between workspaces in Spaces from the comnand line?  I use several workspaces from Spaces, each workspace having a certain number of fixed applications running.  Rather than set all this up each time I log on, I'd like to write a script from the command line (I use gawk) to automate this. Currently I have a gawk script that, given a directory, opens a few xterms whose working directory is the given directory, and opens "preview" applied to a certain file in that directory.  However, at present I have to manually move an xterm through each workspace and run my gawk script in each workspace (applied to each directory that I'm working on).
    There must be a better way...

    Addendum: Can this be done via:   open -a Spaces --args xxx  , where xxx is some set of arguments (or something like this)?

  • Run javascript (not in a jsx file) from the command line extendscript

    Hi all,
    I was wondering if anyone knew how to run javascript from the command line in Extendscript (meaning Extendscript would be the target application). I know about the -run command line flag in which allows you to run a .jsx script from the command line but what I'm looking for similar syntax to run a script directly without needing to put it in a file. For example I have tried (obviously unsuccessfully):
    C:\Program Files (x86)\Adobe\Adobe ExtendScript Toolkit CC\ExtendScript Toolkit.exe -run "alert('Hello World');"
    Thanks!

    You might be looking for something like this: javascript - Is it possible to execute JSX scripts from outside ExtendScript? - Stack Overflow
    Although that one is about executing JSX files, the solutions given (Applescript as well as COM/VBScript) can be adapted to simply run a javascript code snippet rather than JSX file because the solutions simply call the Adobe app's Applescript/COM API to "execute javascript" (actually execute ExtendScript technically), and in the solution, they using includes to pull in the JSX file. You'd simply replace the include with actual javascript code snippet inserted in.
    Though this would then require you to run a VBScript, Applescript, or other script (that calls the COM/Applescript API) rather than the ESTK command line option.

  • Is it possible to script Firefox to do things from the command line?

    Specifically, I am attempting to print a web page at a specific url from the command line.

    Thanks for the quick reply. I had already seen the page you linked to, but it doesn't have any commands to print a web page. Should I interpret from that absence that there isn't a way to print from Firefox from the command line?

  • Afterfx command line "restores" maximized window - any way to duplicate ExtendScript invocation?

    Hi all,
    I am controlling After Effects CC from another application by invoking JavaScript files from the command line. But the command *always* restores the maximized window of After Effects. That is, if the After Effects application is maximized, it always *restores* it, every time I invoke the JavaScript file through the command line (e.g. through Windows cmd prompt or through my application). When I execute the same JavaScript file through ExtendScript IDE, it doesn't do this erronous behaviour.
    For example: "AfterFx.exe -r C:\path\showDialog.jsx"
    Contents of showDialog.jsx:
    alert("Showing Dialog from JSX file");
    My question is: Is there *any way* to mimic what ExtendScript does to invoke JavaScript files?
    From listening on Windows processes, it seems that ExtendScript tacks on some JavaScript code, dynamically, to do the execution (i.e. couldn't trace any command line processes/arguments). But I can't seem to figure out what exact JavaScript code it invokes. ExtendScript also seems to be working via Bridge.
    I get the same "restore window" behaviour when I try to use "-s" argument with the JavaScript expression passed as a string argument or if I use "AfterFx.com" instead of "AfterFx.exe". I couldn't find any documentation for what command line parameters are supported for AfterFx (other than "-r" and "-s") and what Extend Script might be doing exactly to invoke the .jsx files. I managed to take a peek at the executable binary of AfterFx.exe (through a hex editor) and noticed the following switches.
    -rquiet, -noerr, -noui, -debug, -livelink, -selflink, -headlessonly, -rquiet, -rq, -mp
    But I couldn't get the "window restoring" behaviour to stop with any of the parameters.
    Any advice will be really appreciated.
    Thanks.

    Hi,
    Thanks again for your comments. I tried with PsExec just now but no luck still. The only useful argument parameter in PsExe seems to be:
    -d
    Don't wait for process to terminate (non-interactive).
    But the same behaviour happens. I tried with "-e" as well (separately and combined with "-d").
    I also tried a few command line argument options with "start" command, on the Windows Command prompt. For example:
    "start /MAX AfterFx.exe -r C:\path\file.jsx" <-- supposed to start the application in the maximized state
    "start /b AfterFx.exe -r C:\path\file.jsx" <-- supposed to start the app without a creating a new window
    But no luck still . Tried various combinations of the above two arguments as well.
    Seems like Adobe After Effects explicitly does something weird to snap the application *out* of the MAXIMIZED state, if the executable is invoked (either via command line, with or without arguments or directly from start menu/GUI items). I don't know why they would do this though. I also wonder whether this is simply a bug in their implementation of Adobe After Effects CC on Windows 7.
    Is there any way to MAXIMIZE Adobe Effects Effects through their JavaScript API? I am wondering whether I can explicility check/set the window to be maximized in my invoked script, to fix this behaviour.
    Thanks.

  • I want to set password security on a pdf from the command line

    I have a pdf file that is created and placed on a report server.  I would like to run a batch cmd to set the security for that pdf based on a saved security policy.  I will call the batch cmd file from a batch application.  Can Acrobat XI handle this operation or do I need a third party tool.  The pdf is created by BI Publisher (Peoplesoft).
    Thanks,
    Jay

    You need to invoke your cmd manually, don't you? So, instead of opening the Terminal application, enter the command and press "Enter" you open Acrobat and click a button. It's a different manual step to start the process, but you need a manual step to start the process anyway. I do realize that you may have a bash/perl/python script that does more than just apply encryption but that's the capability that Acrobat has.
    Regretfully, Acrobat JavaScript API does not provide functionality to encrypt with password. You can use JS to encrypt with certificates but [for unknown to me reason] not with passwords. Otherwise it could've written a JS script that encrypts, embed this JS in a separate PDF, open that PDF from a command line with your JS script executing on Open and have this LS script do all the work you need. Well, you can do that for certificate encryption but not for password encryption. I don't know why. And you cannot invoke an action from  a JS either. Oh, well...

  • Launching Rescue & Recovery from a Command Line

    Question - I would like to know how I can launch Rescue & Recovery from a command line.
    Issue that is prompting the question -  My laptop was sitting in my computer bag overnight. The battery was fully charged. I BELIEVE that it was in suspend mode at the time. When I opened it in the morning, there was a message on the screen saying that a backup had not completed successfully. I then noticed that the battery had run down completely.
    My Plan - I would like to launch Rescue & Recovery (as well as the Defrag utility) from Windows Task Scheduler. If I do, then all schedule tasks will be launched and controlled using the same process. Windows Task Scheduler also provides two key scheduling criteria that the IBM Rescue & Recoverry or the IBM Maintenance Manager utilities do not provide -
    #1 - Run this task only when the PC is on AC power.
    #2 - Run this task ony when the computer is idle (so that it doesn't slow down the PC if I happen to be working on it)
     Background Concerns -
    - Having a backup job automatically start when the computer is in my computer bag will run down my battery when I least expect it.
    - The PC may could also be damaged due to overheating, since the sides of the computer bag  block the ventilation holes.
    Additional Info
    - If I go to the ThinkVantage Productivity Center and select the Quick Link for "Backup Now" this will indeed launch a backup on demand. I assume that selecting this option is calling a specific executable file.
    - However, the only two applicable executable files that I see in the C:\Program Files\Lenovo\Rescue and Recovery directory are "mr_gui.exe" and "wizrr.exe". Both of these files launch an interface that requires the user to make a selection. As a result, it doesn't look as if either of these files would work for unattended operation, unless there is some sort of switch that I can put in that will automatically start the backup process.
    - I called the support line (only once so far), but that particular rep did not know of any way to launch Rescue & Recovery other than from the standard R&R user interfaces.
     Any help is greatly appreciated,
    Mathew

    The correct way to invoke a JSP is to make a request to the Server.
    Normally you would use your browser to do this.
    On a unix system, you can use the wget command to invoke a url without using a browser.

  • Execute Process Flow via command line

    How can I execute a Process flow from the command line?

    As far as I know once the job is setup in OEM it is submitted either through OEM UI or by scheduling, I don't think there is a command line interface. I would ask on OEM forum anyway Enterprise Manager
    But why such complexity? All OWB maps keep the execution audit history in one place already.
    Nikolai

Maybe you are looking for

  • Is Front Row multi Region?

    I have just got Front Row for my PowerBook and put one of my movie DVD's in and front row played it without asking me what region I would like to choose, As I have lived in the US, the UK and Australia I have DVD's from 3 different regions which is w

  • Problems with Lightroom 5.2 and Olympus EM-1 RAW files?

    There have been reports on DPREVIEW of color problems using Lightroom 5.2 with RAW files from the Olympus OM-D EM-1 camera.  This causes  difficulty creating camera profiles, and creates a red shift in Images.  JPG images are unaffected. Anyone else

  • Javascript:void(0) error in portal page

    Hi,     I am using EP 7.1. IE 6. when i am working in content admin, user admin or system admin some time entire roles are working fine. But in frequent way i am getting error in portal page like JavaScript: void (0) and at the mean time i am unable

  • Internet Explorer 11 management

    Hi all: A few weeks ago I rebuilt a server we use to run WSUS. When I finished I forgot to turn off loading updates for Internet Explorer as I wanted Version 9 to remain on our Windows 7 workstations. So now everyone has version 11. Now we have a new

  • Disabling the "X" in the Window

    I'm using the following command; id := GetSystemMenu(WindowHandle, 0) RemoveMenu(id, 6, 1024) DrawMenuBar(WindowHandle) to disable the use of the "X" in the top right of the window. Is there any way to tweak this so the underscore and "X" disappear c