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

Hi There,
I am new to scripting for AE so please go easy on me.  I have these two lines in a script which is a plain text file with .jsx as the extension.
var project = new File("C:\path\to\my\project.aep");
app.open(project);
So then, I go to my command line and enter this.  I should note that I added the directory containing afterfx.exe to my environment path (I am running Windows 7).
afterfx -s myscript.jsx
When i hit enter, AE launches, but I get an error that says:
Unable to execute script at line 1.  After Effects error: Unable to call "open" because of parameter 1.  Path is not valid.  Path: C:\Program Files\Adobe\Adobe After Effects CS5\Suppor Files\pathtomyproject.aep
What?!  Why does it think my aep file is within the Support Files directory?!  Is it because of the path environment variable I setup?  Any tips to force AE to find the file I specified in the new File() method?
Thank you for any advice and your time!

Hi,
You need to use double backslashes in the path, like so:
var project = new File("C:\\path\\to\\my\\project.aep");
/Ludde

Similar Messages

  • I cannot open files in excel with error message "The file name or path contains invalid characters

    I cannot open files in excel with error message "The file name or path contains invalid characters

    Found the solution. The hardrive name was changed to "/" which is not a recognised file path character. So I changed the name to "Mac" then I was able to already open all files in excel and word

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

    I've set up InDesign CC Server 2014 trial on a Windows Server 2008 R2 and trying to run a simple script that converts a idml to PDF.
    Here's 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'm running the script in ExtendScript Toolkit CC and it gets hung up every time on the first line, open() method.
    I've verified the path and permissions are fine as other scripts work that write output, such as this one.
    //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 problems at all with that script.
    Please help!

    Figured it out. Path for app.open() needs \\ instead of \.

  • WiFi - no online apps work in hotspots even with wifi symbol on

    Hi. I can connect and use my home wifi with online apps but at hotspots, even with open networks, I get the wifi on symbol but nothing loads in any online app (incl. safari). Any ideas?
    Thanks.

    1, not all hotspots are really free.
    2, Most require you to accept terms and conditions (thus always try safari first).
    If safari doesn't bring you to a terms and conditions page when you try to go somewhere then good chance the spot really isn't free for all.
    Once you find a spot that does allow you to accept terms (or Safari just works) then apps will work with the WiFi...you just need to always check safari first.

  • I saved a word file onto my imac.  when i go to open file in documents with pages the file is grey and unable to open.  the workable files are highlighted in bold.  is there a way to open this file????

    i saved a word file onto my imac.  when i go to open file in documents with pages the file is grey and unable to open.  the workable files are highlighted in bold.  is there a way to open this file????

    THis is safe for Mac's? Sorry, I have just never heard of this site before.
    And there are literally tens of thousands of sites of which I've not heard, too. Not this one.
    It's legit. There are lots of links in Apple Support Communities to the LibreOffice web site, as well as others that are legitimate open-source developers of options to buying MS Office, such as NeoOffice and OpenOffice. I have Open Office installed on one of my older Macs that can't run Office 2011 and it is rock-solid.
    I've been here too long to start posting bogus urls now.

  • Can't open file--"not compatible with this version"

    I can not open a photoshop file, although it was saved with the same version. "The file is not compatible with this version" can someone help me.
    thanks

    hi kirsti
    I use windows 7 and photoshop cs5
    thank you
    Am 02.05.2012 19:06, schrieb Kirsti Aho:
    >
          Re: Can't open file--"not compatible with this version"
    created by Kirsti Aho <http://forums.adobe.com/people/Kirsti-CA> in
    /Community Help Application/ - View the full discussion
    <http://forums.adobe.com/message/4374618#4374618

  • Robohelp HTML command-line utility overwrites merged files in .hhp file with absolute paths. Any way to prevent this?

    I have a Robohelp 11 HTML project which uses merged CHM files. I have a help build script which compiles this project using the RH command-line utility. Whenever this runs, RH overwrites the names of the merged CHM files in the .hhp file to use absolute paths (even if the .hhp file is read-only!). I've searched Adobe forums and this appears to be a RH bug. In my case, it doesn't stop the project performing the merge, but it looks like it causes problems when searching the resultant parent CHM (topics matching the search simply don't show up in child projects), as the search cannot necessarily find the merged files referenced in the .hhp when someone performs the search on a different machine. I notice that if I compile via the RH UI, the .hhp entries are not overwritten. So, a workaround is to do the build manually. However, we'd like to automate our help build. Is there any way to prevent the command-line compiler overwriting the merge file entries in the .hhp?

    This was a problem with Rh9, see Item 13 at Using RoboHelp 9
    I haven't seen it reported since but maybe something at that link will help.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • How to get InputStream from a file with absolute path?

    Hi, guys:
    If I have file with a absolute path that may be inside/outside
    my Eclipse plugin, I want to get an InputStream from it. It just keeps giving me null for "is":
    String absFilePath = "/D:/my_dir/.../sample_file.txt";
    InputStream is = getClass().getResourceAsStream(absFilePath);
    regards,

    Don't use resource as stream if you have an absolute path, use FileInputStream.

  • Open File - Security Warning with Network-based Silent Install of CS4

    I am attempting to run an enterprise deployment of CS4 Design Standard Edition onto a pool of WinXP Pro workstations. I placed all of the install files on a networked server running Windows 2003, and generated from there all of the requisite .xml files (install, uninstall, and override files). From this network share, I can successfully run a silent install.
    HOWEVER. Multiple times (two or three) during the course of the silent install, I receive the same pop-up security warning from Windows XP (definitely an OS message, not anti-virus or other) that reads as follows:
    Open File - Security Warning
    Do you want to run this file?
    Name: AIRApplicationRunner.exe
    Publisher: Adobe Systems Incorporated
    Type: Application
    From: (server IP address)
    I have tried excluding Adobe Air from the installation package, but I still receive the same security prompt. This is sufficiently a hassle to have to click through these prompts in a silent install. But more importantly I am unable to run the silent install as part of a logoff script because for all intents & purposes it is no longer a silent install (i.e. it requires user intervention). To top it off, I found when testing the logoff script the prompts are suppressed and the installation fails prior to the bulk of the installation (Photoshop, Illustrator, & InDesign).
    I'm sure that I could run the install by copying all of the files to each local workstation, but again that would defeat the purpose of an easy, network-based install. In the past I was able to install CS3 in this fashion with no troubles, which of course did not include Adobe Air.
    Can anybody offer a suggestion as to how to disable these security messages, or alternately, how to entirely exclude Adobe Air from the install package? I have found a VB script that is supposed to address the security warnings issue, but to run the script also requires the user to accept it at a security prompt.
    Thanks in advance for any assistance!
    -Dan

    I'm now able to deploy design suite premium cs4 successfully.
    The issue for me was that the AirapplicationRunner installs some useless software. I worked around the issue with the Airapplicationrunner prompt by removing any apps that are installed using that method. By "removing" I mean marking that app as "donotinstall" in the deployment file. The apps I removed are these adobe codes for adobe media player, adobe.com, adobeair itself. The below is from my deploy.xml file used for the silent workflow:
    donotinstall
    donotinstall
    donotinstall
    If you mark those three adobe codes as "donotinstall" the prompt never appears and the real apps get installed just fine.

  • Open file in folder with command line program

    I have a file, which is in native format for a given program [1] I have installed. This program I can start from Terminal.app and within the program I can open the file. The question is if I can have associated with this specific filetype this program and when I double click on a file of this type I can have a Terminal.app opened with my program running inside opening the file for me.
    Btw, on a regular Linux/Unix I would just associate this filetype with the path to my program. On Mac I can associate only with .app.. Is there other way?
    [1] http://root.cern.ch/drupal/

    I do not fully understand your question.
    You need to make your program into an application. I have not programmed on Mac OS so I to not know the details. You could hack some existing app. I do know that the plist file for an app points to the starting program.
    Another work around would be to write an apple script file to call your program.
    This applescript invokes a unix program.
       Run in the Script Editor.
       Click on the Event Log tab to see the output from the log statement
       Click on Run
       For running shell commands see:
       http://developer.apple.com/mac/library/technotes/tn2002/tn2065.html
    on run
       -- Write a message into the event log.
       log "  --- Starting on " & ((current date) as string) & " --- "
       -- ask the user for the folder name.
       -- quoted form of (POSIX path of (choose folder))
       set theFolder to "/Applications/Utilities/Disk Utility.app"
       set theFolder to quoted form of theFolder
       log "quoted form is " & theFolder
       -- running two Unix commands. Separate with a semicolon 
       set fromUnix to do shell script "cd " & theFolder & "; ls -ld ."
       log fromUnix
       display dialog fromUnix giving up after 30
    end run
    This applescript program received a file dropped on it.
    There is a lot of extra stuff but look at on open dropped_items This line gets a list of files dropped on the applescript. Your have to change the name format.
    on open dropped_items
       -- Remember you need to turn on enable assistive devices
       -- this lets applications software to access screen elements
       -- blue apple > system perferences > universal access > enable assistive devices
       -- Write a message into the event log.
       log "  --- Starting on " & ((current date) as string) & " --- "
       -- set see to alias "Macintosh-HD:Users:mac:Desktop:app.html"
       -- set dropped_items to {see}
       set the_app to "Safari"
       repeat with dropped_item_ref in dropped_items
          --set UrlBase to "xzzx FILE://" & POSIX path of dropped_item_ref
          --display dialog UrlBase
          -- Activate
          activate application the_app
          -- Open the URL 
          tell application the_app
             open dropped_item_ref
             -- print dropped_item_ref
             tell application "System Events"
                tell process the_app
                   delay 3
                   -- click menu item "Print..." of menu "File" of menu bar 1
                   keystroke "p" using command down
                   delay 1
                   keystroke return
                   delay 10
                   keystroke "w" using command down
                end tell
             end tell
             --quit
          end tell
       end repeat
    end open

  • Embedding fonts in AS3 with absolute paths

    I'm having difficulty embedding fonts in AS3. For instance,
    using absolute paths:
    [Embed(source="C:\WINDOWS\Fonts\CONSOLA.TTF",
    fontName="Consolas", mimeType="application/x-font-truetype")]
    ... I get the error message: "Error: unable to resolve
    'C:WINDOWSFontsCONSOLA.TTF' for transcoding.
    I'm hoping the backslashes are missing from the error just
    because the compiler doesn't return them, and not that it's losing
    them. I've tried various TTFs with the same result. Even tried
    copying code from the AS3 Cookbook letter for letter. :)
    Thoughts?

    I have a similar issue happening. I am using AS3 and have
    this code in my file:
    // package, import statements etc...
    // the line below is the problematic line
    [Embed(systemFont="..\\..\\..\\fonts\\arial.ttf",
    fontName="Arial (True Type)",
    mimeType="application/x-font-truetype")]
    // now declare my class
    public class ImageRotator extends UIComponent
    // etc.
    The class compiles fine but when I try to run it I get the
    following runtime error:
    "Error: Error #2136: The SWF file
    file:///C:/projects/photogallery_screensaver/bin/photogallery_screensaver.swf
    contains invalid data."
    I've tried several things including changing the location of
    the font file, using a different font file, embedding a systemFont.
    But I always get the same error.
    Help please!
    Thanks,
    Dan

  • What have "Too many open Files" to do with FIFOs?

    Hi folks.
    I've just finished a middleware service for my company, that receives files via a TCP/IP connection and stores them into some cache-directory. An external program gets called, consumes the files from the cache directory and puts a result-file there, which itself gets sent back to the client over TCP/IP.
    After that's done, the cache file (and everything leftover) gets deleted.
    The middleware-server is multithreaded and creates a new thread for each request connection.
    These threads are supposed to die when the request is done.
    All works fine, cache files get deleted, threads die when they should, the files get consumed by the external program as expected and so on.
    BUT (there's always a butt;) to migrate from an older solution, the old data gets fed into the new system, creating about 5 to 8 requests a second.
    After a time of about 20-30 minutes, the service drops out with "IOException: Too many open files" on the very line where the external program gets called.
    I sweeped through my code, seeking to close even the most unlikely stream, that gets opened (even the outputstreams of the external process ;) but the problem stays.
    Things I thought about:
    - It's the external program: unlikely since the lsof-command (shows the "list of open files" on Linux) says that the open files belong to java processes. Having a closer look at the list, I see a large amount of "FIFO" entries that gets bigger, plus an (almost) constant amount of "normal" open file handles.
    So perhaps the handles get opened (and not closed) somehwere else and the external program is just the drop that makes the cask flood over.
    - Must be a file handle that's not closed: I find only the "FIFO" entries to grow. Yet I don't really know what that means. I just think it's something different than a "normal" file handle, but maybe I'm wrong.
    - Must be a socket connection that's not closed: at least the client that sends requests to the middleware service closes the connection properly, and I am, well, quite sure that my code does it as well, but who knows? How can I be sure?
    That was a long description, most of which will be skipped by you. To boil it down to some questions:
    1.) What do the "FIFO" entries of the lsof-command under Linux really mean ?
    2.) How can I make damn sure that every socket, stream, filehandle etc. pp. is closed when the worker thread dies?
    Answers will be thanked a lot.
    Tom

    Thanks for the quick replies.
    @BIJ001:
    ls -l /proc/<PID>/fdGives the same information as lsof does, namely a slowly but steadily growing amount of pipes
    fuserDoesn't output anything at all
    Do you make exec calls? Are you really sure stdout and stderr are consumed/closed?Well, the external program is called by
    Process p = Runtime.getRuntime().exec(commandLine);and the stdout and stderr are consumed by two classes that subclass Thread (named showOutput) that do nothing but prepending the corresponding outputs with "OUT:" and "ERR" and putting them into a log.
    Are they closed? I hope so: I call the showOutput's halt method, that should eventually close the handles.
    @sjasja:
    Sounds like a pipe.Thought so, too ;)
    Do you have the waitFor() in there?Mentioning the waitFor():
    my code looks more like:
    try  {
         p = Runtime.getRuntime.exec(...);
         outshow = new showOutput(p.getInputStream(), "OUT").start;
         errshow = new showOutput(p.getErrorStream(), "ERR").start;
         p.waitFor();
    } catch (InterruptedException e) {
         //can't wait for process?
         //better go to sleep some.
         log.info("Can't wait for process! Going to sleep 10sec.");
         try{ Thread.sleep(10000); } catch (InterruptedException ignoreMe) {}
    } finally {
         if (outShow!=null) outShow.halt();
         if (errShow!=null) errShow.halt();
    /**within the class showOutput:*/
    /**This method gets called by showOutput's halt:*/
    public void notifyOfHalt() {
         log.debug("Registered a notification to halt");
         try {
              myReader.close(); //is initialized to read from the given InputStream
         } catch (IOException ignoreMe) {}
    }Seems as if the both of you are quite sure that the pipes are actually created by the exec command and not closed afterwards.
    Would you deem it unlikely that most of the handles are opened somewhere else and the exec command is just the final one that crashes the prog?
    That's what I thought.
    Thanks for your time
    Tom

  • Idisk app opening files

    I save a microsoft works word processor document on my pc,
    I upload it to idisk.
    On my iphone idisk app when i try to open the file, it comes up with file unsupported.
    How do i change the document to the correct file type for idisk to funtion(open file}???

    The iPhone supports the following file types:
    .jpg, .tiff, .gif (images); .doc and .docx (Microsoft Word); .htm and .html (web pages); .key (Keynote); .numbers (Numbers); .pages (Pages); .pdf (Preview and Adobe Acrobat); .ppt and .pptx (Microsoft PowerPoint); .txt (text); .rtf (rich text format); .vcf (contact information); .xls and .xlsx (Microsoft Excel)
    Save the document as a .txt, .pdf, .doc, .docx or .rtf to view it on the iPhone. Preferably, either .doc or .docx (which are MS Word file types).

  • "open file" Not working with Photoshop CS2

    System
    MAc Pro Dual Quad 3Ghz, OS X 10.5.2
    I have a script that I wrote a while ago to take a series of individual bitmaps and compile them into a strip for access inanothe application. Script used to work well....
    I tried to use the script today but ran into a brick wall when trying to open files from within the script.
    below is an example of a script that will not work at all,
    tell application "Adobe Photoshop CS2"
    open file "AV:logo:rot0001.png"
    end tell
    I normally pass the function a variable for the filenames...but the above script should work fine.. but flatly refuses to !
    Below is the Error returned.
    Adobe Photoshop CS2 got an error: General Photoshop error occurred.
    - The object “current document” is not currently available.
    Arghhhh Help !!
    Rgds
    Chris

    Hello
    Perhaps your script used to work under pre-OSX10.5 (AppleScript 1.x) but now fails under OSX10.5 (AppleScript 2.x)?
    If so, the most likely cause is the drastic change in internal text handling between them. In AS2.x, internal text is Unicode only, which might prevent PSCS2 from resolving 'file path_string' descriptor (when path_string is assumed to be plain 'string', not Unicode text).
    Try the following code instead -
    tell application "Adobe Photoshop CS2"
    open ("AV:logo:rot0001.png" as alias)
    end tell
    Or -
    set a to "AV:logo:rot0001.png" as alias
    tell application "Adobe Photoshop CS2"
    open a
    end tell
    Hope this may help,
    H

  • Firefox keeps asking me what program to use to open file types even though I have selected one and checked "do this for all files of this type" going foward

    I am working in Windows and every time I open an attachment, Firefox asks what program to use to open files of this type. I always select the proper program and then check the box that says use this program for all future files of this type. In spite of that, the program continues to ask for every file. How do I turn off this feature and just have the program remember the correct program to use for each type of file extension?

    Regardless of your download preferences, web servers can trigger a download prompt by sending either the ''Content-Type: application/octet-stream'' or the ''Content-Disposition: attachment'' header. You can check if that's the case by examining the server response headers in the [https://developer.mozilla.org/docs/Tools/Web_Console Web Console].
    For the latter problem install the InlineDisposition add-on and see if it helps.
    * https://addons.mozilla.org/firefox/addon/inlinedisposition/
    If the problem persists, post back here with either an example link or a screenshot of the relevant response headers in the Web Console.
    * [[How do I create a screenshot of my problem?]]

Maybe you are looking for