App.Open (file) fails even with absolute path.

Hello

I am new to scripts for AE please go easy on me.  I have these two lines in a script which is a text file with a .jsx extension.

project var = new File("C:\path\to\my\project.aep");

App.Open (Project);

So, I go to my command line and enter this.  I should note that I added the directory containing afterfx.exe on my road to environment (I'm running Windows 7).

afterfx s myscript.jsx

When I hit enter, AE lance, but I get an error that says:

Unable to run the script at line 1.  After effects error: cannot call 'open' because parameter 1.  Path is not valid.  Path: C:\Program Files\Adobe\Adobe after effects CS5\Suppor Files\pathtomyproject.aep

What?  Why he thinks that my ASP file is in the directory of media files?  It's because of the path environment variable set that up?  Tips to force AE to search for the file that I specified in the new File() method?


Thanks for all the tips and your time!

Hello

You must use the double backslashes in the path, as follows:

project var = new File("C:\\path\\to\\my\\project.aep");

/ Ludde

Tags: After Effects

Similar Questions

  • CC of InDesign Server 2014 app.open (file) does not exist.

    I have implemented CC InDesign Server on a Windows Server 2008 R2 trial 2014 and try to run a simple script that converts an idml to PDF format.

    Here is the code

    document = app.open(File("C:\inetpub\wwwroot\presentation\Documents\Resumes.idml"));
    document.exportFile(ExportFormat.PDF_TYPE, File ("C:\inetpub\wwwroot\presentation\Documents\file.pdf"));
    document.close();
    

    I am running the script in ExtendScript Toolkit CC and it impedes every time on the first line, the open() method.

    I checked the path and permissions are fine as the other scripts work that write output, like this.

    //HelloWorld.jsx
    //Create a new document.
    var myDocument = app.documents.add();
    //Get a reference to the first page.
    var myPage = myDocument.pages.item(0);
    //Create a text frame.
    var myTextFrame = myPage.textFrames.add();
    //Specify the size and shape of the text frame.
    myTextFrame.geometricBounds = ["6p0", "6p0", "18p0", "18p0"];
    //Enter text in the text frame.
    myTextFrame.contents = "Hello World!";
    //Save the document (fill in a valid file path).
    myDocument.save(new File("/c/HelloWorld.indd"));
    //Close the document.
    app.documents.item(0).close();
    

    No problem at all with this script.

    Help, please!

    Figured it out. App.open path () needs------instead of \.

  • Elements of 14 updates fail even with firewall disabled?

    Just bought and installed 14 elements but updates fail even with firewall disabled? The failure screen gives an error log link, but there is nothing there

    Troubleshoot installation | Photoshop Elements, Elements first. Windows

    Nancy O.

  • cannot open files or programs with icons

    Whenever I try to open files by using icons or shortcuts, I get the following message: System call failed. It has a title of explorer.exe on the box. I can't even get into Control Panel

    Hi Steve,.

    If you are using Vista, go to http://www.mydigitallife.info/2008/06/22/reset-and-fix-broken-windows-vista-file-ext-and-type-associations-include-exe-com-sys-zip-lnk-folder-drive/ and scroll down to EXE and click or double-click it to run the program to restore EXE file associations.  Once done, do the same for LNK entry.  That should restore your programs.  If you use Windows 7, go to http://www.sevenforums.com/tutorials/19449-default-file-type-associations-restore.html. If you are using XP, go to http://www.dougknox.com/xp/file_assoc.htm.

    Good luck.

    Kosh

  • Opening files Illustrator draw with Indesign?

    Is it possible to open files created with Adobe Illustrator draw on an iPad directly in Adobe Indesign? Or this workflow requires Adobe Illustrator or Photoshop as an intermediary?

    Hello Gus,

    It is only possible to send to Illustrator and Photoshop CC from the app.

    Sue.

  • Cannot open file Captivate 4 with Captivate 8 program

    Hello

    I can't open the Captivate 4 with Captivate 8 program file.

    I tried to open some projects I created with Captivate 4, but without success...

    So much has changed between the versions. You need an intermediary

    version 5 or 5.5. But even in this case I recommend you start from

    scratch, because the amendment process would take probably more time than

    recreating.

  • Why can not open files audio VAC with Vista home premium but my friend can with Windows 7?

    Quick Time error message.   How do you open using another program?

    Another way is to click on start > default programs > associate the type of file or Protocol with a program > and change the default program associated with this file type.

    Have you tried to open Media Player and play the file directly? You are running the latest version of Media Player?

  • Open file failed with webstart unsigned application

    Hello

    Is it possible to open a document in the base application registered user (on the operating system) to an unsigned Java webstart application?
    I don't mind if the user receives a warning, but the only thing I found was the ability to save a file (also with a warning to the user), but I would like to automatically open the document generated by the webstart application in the default application on the operating system that is recorded for the file association. In this case, either a file *.xml or *.xlsx (Excel/OpenOffice)

    Any ideas?

    You can use BasicService.showDocument () to do this, but you will get a white windows open in the default browser.

  • Cannot open files exe, even in safe mode

    My computer worked fine until last night. When I went today to my Ad-Aware Pro detected several attempts to change the registry. I wasn't sure what they were thus blocked. Now part of Ad-Aware Ad-Watch will not load and I can't open any .exe files at all, he said that there is no program associated with this action and to create in folder options. My Windows Explorer seems to be missing (the icon that launches in any case), and system restore no longer works (don't get the same message - no program etc...). I downloaded several anti-spyware scanners, but I can't run these either! When I restarted after having blocked attempts suspicious to change the registry, he stopped on the Welcome screen with a dialog box that has two small black lines in it, a close button (which does not), and an ok button. The boot process will not continue unless you click ok. It does now every time you start. Also, I booted in safe mode but nothing works, there either and I can't update my AV. in 'connect to the server' I tried the run box on the start menu to get the command prompt and that does not work either, I get the same message on there is no program etc... For a few icons I click that actually do something, they are all open Ad-Aware. It's my fault - probably the first time, he asked me to associate an icon with a program, I chose to apply it to all the files like this. Don't you think it's a virus?

    I have tried everything that suggests even joined a malware forum suggested, all to nothing done, because my system doesn't let me exercise one or more of the actions/suggestions/software. I'm admitting defeat guy - I'm going to rebuild, there is too much error different messages/things that aren't now doesn't work does not correctly that even if I fail to rid the system of the Malware, I'll probably still do more the top of page installation of XP to fix things. I don't have the patience.

    Thanks for everything and I'm sorry if you think I've wasted your time.

  • I recently moved notebook I have all my sequential codes. But when I try to install new downloaded it tells me that the installation program could not initialize the .dmg files. Even with the PES, PS and flash player. None of my installers will initialize

    Literally what the title above says. I just can't get anything to boot. CS4, CS5, PSE 8 PSE 9. It worked just the other day when this laptop had NOTHING on this subject. but now that I have all my files migrated absolutely nothing does not yet have flash player.

    Have you checked: error: "Setup cannot initialize ' | Windows

    Failed to initialize the installation of Adobe

    Mac - installer failed to initialize. (etc.) Help! I can't install the CS6 Master Collection Suite.

    Installer [CS5.5] initialization failed. Please download Adobe Support Advisor to detect the problem.

    Setup could not initialize photoshop cc, Fixed - YouTube

    Concerning

    Stéphane

  • Cannot open file in CS4 with plugins?

    Hi, hoping someone can help.

    I try to open an Indesign file (I think it's a CS3 file) with CS4, but get this message:

    Could not open the file

    Please update your plug-ins their versions the latest, or upgrade to the latest version of Adobe InDesign.

    It lists about 15 plugins that are 'missing ';

    for example:

    PDF. InDesignPlugin

    FontManager

    Group

    Generic

    Table model

    etc etc.

    Any ideas how to get around this so I can work on the doc?

    See you soon

    Jac

    This error message means that you are trying to open a file that is newer than your copy of InDesign. So the file should almost be a CS5 file. Impossible to open a CS5 CS4; you have to open in CS5 and export a file IDML, you can then open in CS4.

    There is an element of additional confusion here:

    InDesign CS4 is actually 6 InDesign when you click Help-> about

    InDesign CS2 is actually InDesign 4 when you click Help-> about

    and so on

    However, it is not possible to see this error message when you open an older InDesign file in a more recent program.

  • In app purchase does not even with the correct password, keeps telling me to contact support Apple, anyone else?

    CCan can't purchase of gems in the app, I get the correct password, and then it requires I answer the security questions, then he said I need to contact Apple support, even though security questions correctly answered like a password! That is what it is? TO

    Click here and ask for help from the staff of the iTunes Store. Only, they know.

    (140077)

  • Cannot open files Photoshop CS4 with Photoshop 7

    Hi - I would be very grateful if someone has solved this problem before and can help me.

    I try to send a relatively small (5 MB) file CMYK in Photoshop in layers of my version (CS4) to someone who is still using Photoshop 7, but they are totally unable to open it. I saved using "Maximize compatibility" and there are just 3 layers without layer fancy, no set of layer, effects, and each layer has a transparent background. Whenever someone tries to open it (via file-> open), their Photoshop crashes and to force quit. It will open in Graphic Converter but it is then saved as a flattened, image is not that good. I'm at my wits end what to do to get this to open in the PS7 - someone has any ideas?

    I'm using Photoshop CS4 on a Mac Pro, OS X 10.6.3; they use Photoshop 7 on a G4 867 DP, OS X 10.4.11.

    Thank you very much.

    Deb.

    If someone else should encounter this kind of problem, here's the scoop:

    This is a bug in the analysis of metadata in Photoshop 7 and CS/8 (version 3-6 no problem, version 9-12 without problem).  It is caused by the metadata of the history of the file, perhaps due to the length of history, perhaps because the bits of history about InDesign.  I don't have a Mac OS 10.1 available in the public system for Photoshop 7 debug more, so I can't be positive about the exact cause.  But we know that Photoshop CS2 and later works just fine.

    If you wait 30 minutes, Photoshop 7 end by to load the file.  But that hurts productivity.

    The metadata of the history can easily be removed in Photoshop (or ImageReady, Fireworks, etc.).  But if you copy layers to a new document, the metadata of the history will not be postponed.  Save the copy, and the copy will work fine Photoshop 7 and CS/8.

  • Cannot close tab groups. Close button fails even with an empty window.

    When I create groups of tabs, I can't close. The red X close tab group button does not work. I can resize, add or remove sites, or even remove all sites. But I can't get the button close the tab of the function group.

    Thanks for the tips. I traced the problem to theme Noia 4 v 1.6.7. I don't know how to advise developer or where else to post this information. But in any case, I will delete it.

  • How to open a file in Photoshop with javascript

    Hello!

    I want to open a file / an image with a click of a button in the extension in photoshop > > javascript.

    Possibly with the relative path for the file extension (must work on several different computers)

    I tried several scripts:

    ===================================================================================

    function somename(){
    
    
    #target photoshop
    
    var fileRef = "C:\\Users\\Username\\Desktop\\scripting\\image.png"     // I tried several differnet syntay about the path >> / \  \\ etc. etc.
    
    var doc = open(fileRef);
    }
    

    ================  OR  ==================================================================

    function somename2(){
    
    
    #target photoshop
    
    var fileRef = new File( ~/desktop/scripting/image.png )     // I tried several differnet syntay about the path >> / \  \\ etc. etc.
    
    app.open(fileRef)
    }
    

    ======================================================

    I know that these paths are absolute, but > > None of them had up to present work


    Any ideas?


    PS: im new on this > > please be specific or provide a few examples thanks :-)!

    well a little update!
    Thanks Davide!

    It works > just, I was a little to the beginner to interpret correctly the answer Davide.

    So I put these codes in the main.js file in the JS folder:

    (function () {
        'use strict';
        var csInterface = new CSInterface();
        function init() {
    
            themeManager.init();
    
            $("#something_1").click(function () {
      var csInterface = new CSInterface();
      var extensionPath = csInterface.getSystemPath(SystemPath.EXTENSION);
      var imagePath = extensionPath + "/image/samplepicture.jpg";
      csInterface.evalScript("openFile('" + imagePath + "')");
            });
        }
        init();
    }());
    

    And it's the hostscript.jsx inside the JSX file:

    function openFile(imagePath) {
    app.open(File(imagePath));
    }
    

    And the index.html file call it like this:


    Very many thanks to all who helped! Take care!

    Ben

Maybe you are looking for