[JS][CS5] Can't save file

Hi,
I'm trying to run the "HellWorld.jsx" example from the Adobe Scripting Guide lesson.
I can never get passed the line highlighted in red below (saving the file as another name, in this case saving as "C:\HelloWorld.indd").
I'm using Adobe ExtendScript Toolkit to run this code with InDesign CS5 as the target.
The error message on the ExtendScript Toolkit is Cannot save "Untitled-1" under a new name.
There is no log file to me to see what caused this error, so I don't know where to start troubleshooting this problem.
I'm not sure this is the file access permission issue or not but I could write the file manually (created a file with a text editor and save the file with that name.)
The code is copied straight from the Adobe InDesign scripting guide as you can see it below.
//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();
Any help or pointer to where I should look would be appreciated.
-Dew

hi
just change this line myDocument.save(new File("C:\HelloWorld.indd"));
myDocument.save(new File("/C/HelloWorld.indd"));
Mi_D

Similar Messages

  • Illustrator cc 2014 can't save files

    Hi!
    I Have a lot of problems with the Illustrator CC 2014. And it freaks me out. I have no idea how to reach Adobe. I've tried another Adobe forum but haven't heard anything.. I would appreciate some sort of help. Or if someone knows where to post the question?
    1) First of all can't save files… I wish this could be the number one feature in a design app but apparently not..
    I got   "unknown error " and all work spent is gone forever. This happens a lot.
    2) also lagging problems. when moving graphics and zooming in illustrator. it is SO stressful.
    I have Two computers, with the same problems.
    Imac 27 " mid 2011
    Processor 3,4 ghz intel core i7
    16 GB 1333 Mhz DDR3
    AMD Redeon HD 6970M 1024 MB
    Osx X lion 10.7.5
    Imac 27" Retina 5k late 2014
    3,5 ghz intel core i5
    32 GB 1600 mhz DDr3
    AMD Radeon R9
    OsX Yosemite 10.10.1

    Nils Petter,
    If no brighter suggestion comes up, you may try the list, see below.
    Did you install fully on both computers (after upgrading the OS if relevant)?
    The following is a general list of things you may try when the issue is not in a specific file, and when it is not caused by issues with opening a file from external media. You may have tried/done some of them already; 1) and 2) are the easy ones for temporary strangenesses, and 3) and 4) are specifically aimed at possibly corrupt preferences); 5) is a list in itself, and 6) is the last resort.
    If possible/applicable, you should save current artwork first, of course.
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to at least 5 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible), for CS3 - CC you may find the folder here:
    https://helpx.adobe.com/illustrator/kb/preference-file-location-illustrator.html
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall (ticking the box to delete the preferences), run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

  • I can't save files to my desktop, but I can save anywhere else. How do I fix this?

    I can't save files to my desktop.  I have no problem saving the same file anywhere else.  WHen I try through excel, for example, it tells me the file is read only. When I try to save it as a different file name, a pop up tells me I do not have permission to save to the desktop.  The same issue occurs when I attempt to take a screen shot (default save to desktop)

    Click on it, choose Get Info from the File menu, give yourself Read & Write access under Sharing and Permissions or Ownership and Permissions, and ensure it's not locked.
    (64371)

  • Can we save file developed in captivate 4 to captivate version 3

    Can we save file developed in captivate 4 to captivate version 3? If yes are there any issues?

    Sorry, there is no backwards compatibility, you cannot save in format CP3 from CP4. Perhaps it is possible, if you have both CP3 and CP4 installed to copy slides from the CP4 to an blank CP3-file. As long as no new features of CP4 are present this could work.
    Lilybiri

  • Can't save file with futura font?

    Hi
    I'm having a problem saving a file that contains the futura font. This is a font my company had to buy. I never had a problem with CS1 or CS2 using this font.
    Once I place the font in the document it will let me save it once. After making changes and trying to save again I get a window that simply says "can't save file". I've tried unchecking the pdf compatible option and the compression option with no change.
    I found one thread on this site about clearing out the font cache (by deleting the file C:\windows\system32\FNTCACHE.dat) and that didn't make a difference.
    When I'm done with the document I'll be converting the text to outlines but I need a fix will I'm working on the doc.
    Thoughts?

    Mike,
    Glad you got it sorted out. After I sent you back the regenerated fonts, I discovered something which I'm posting here for everyone's benefit.
    Myle nailed it when he suggested an "an issue with font embedding." The fonts you sent me were all embedding-restricted. It's possible you could have saved your documents had you turned off the PDF compatibility option, but it's moot now.
    It's doubtful the fonts I regenerated for you will solve the problem because putting them through my font editor did not remove the embedding restriction. I would bet dollars to doughnuts that your replacement fonts do not have embedding restriction.
    To check for the embedding restriction, you don't need a fancy program. Just download this Windows extension from Microsoft and install it. Then, right-click | Properties on any font file will give you a lot more information about that font, including licensing/embedding restrictions.

  • IWork: Bought as an app but never got serial number so I can't save files??

    iWork: Bought as an app but never got serial number so I can't save files??

    This means that at some time you had the iWork ’09 trial installed. You need to delete the trial & then reinstall from the boxed DVD or the Mac App Store. The files to delete are the iWork ’09 folder from the main HD > Applications; the iWork ’09 folder in HD > Library > Application Support & the individual iWork application plist files found in HD > Users > (your account) > Library > Preferences for each user. Yvan Koenig has written an AppleScript that removes the files. You can find it on his box.com account in for_iWork'09 > other_iWork'09 items > uninstall iWork '09.zip.

  • Updated photoshop cc and I can't save files now

    Updated photoshop cc and I can't save files now

    No, but before anyone can help you, you'll need to tell us what version of Photoshop you are using, and what your new update status is. Plus we need to know what your operating system is.
    [edit]
    Whoops.  Just noticed that you mention CC, so I guess you are talking about 14.1.  So what is your OS?

  • New iMac  I can't save files.  Need to allow "write access"  How do I do this?

    New iMac  I can't save files.  Need to allow "write access"  How do I do this?

    Sep 30, 2012 8:58 AM 
    Trying to save images in PS CS6 but keep getting the message that I cannot because "write access not granted"
    iMac, OS X Mountain Lion (10.8.2) 
    This solved my question by Rosbeg39  on Sep 30, 2012 10:53 AM 
    I AM learning......this is the other screen grab that you wanted
    See the answer in context 

  • CS6 can not save files over 2GB???????

    I need to make a giant poster at 6ft wide x 5 ft tall. I created a blank document in CS6 at 200ppi. I created some text, and imported a couple of 25MB images. I am unable to save the file as a .PSD because it indicates that PS can not save files over 2GB.
    1. How did this file grow to become over 2GB?
    2. Why can PS not save a .PSD over 2GB?
    3. What do you do if you need to create a large format print such as this?
    Thanks in advance.

    Very true.
    However, Jeff knows exactly what he's doing and he's very, very good at it.  If your image were fortunate enough to end up being printed by Jeff Schewe, he'd be able to tell you exactly what kind of an image file he wants from you. 
    Always check with the printer.

  • Ready-only issue. Can't save files or highlight with Reader 11.7.1 & Kitkat 4.4.2 Samsung Tab 3

    Hello,
    I got several updates last weekend. Since then I can't save my pdf files properly. Before everything was fine.
    When I want to open a pdf now -  a prompt pops-up, saying this:
    Read-only document
    To modify this document save a copy on your device. The document will be available to other applications on this device.
    I found another thread which describes the same error - but I already have 11.7.1 with 4.4.2 and it does not work.
    Can't save files or highlight them on Reader 11.7.0 in Kitkat 4.4.2 Acer A1 Tablet

    Are these files stored on your external SD card or your internal storage? Android KitKat has added restrictions for third party apps from modifying content on the external SD Card. You can find some more information here: KitKat and SD cards — what's fixed, what's broken and what's misunderstood | Android Central
    Could you please confirm if the issue exists for files on the SD card only?
    Thanks,
    Adobe Reader Team

  • Can I save files from my pc onto iCloud and access them from my iPhone?

    Hi, I'm new to iCloud. Just set it up on my iPhone and PC. Can I save files on my pc onto iCloud so I can access them from both my iPhone and PC?

    StoneMountainGirl,
    No. You can only music to your iPhone from one computer at a time.  If you try to load music onto it from a 2nd computer, it will erase the current content on the iPhone and replace it with whats in the iTunes library you are connected to,
    B-rock

  • CS5 - Can't save to firewire drives "file open by another application" error

    Hi There,
    We can't seem to use Fireworks CS5 with external drives. If we have a file open and try to save back to the disk, we receive an error saying it could not save because the file is open by another application - "Save As" seems to work though.
    Is any one else experiencing this or have a fix?
    Cheers
    Ben

    Thanks for that Sarthak,
    I don't have a USB drive but can confirm that I can save files when the file is on the mac desktop or on a USB stick without any issues.
    So yes, at this point I think the issue is confined to Firewire drives (at least on my system which is 10.5.8).
    Cheers
    Ben

  • Ds4  can't save files.  Error message: while executing onload in_opOpen.htm

    All of a sudden I'm getting this error message. I can view files and create files but can no longer save files.
    If I try to save a file, I get the following message:
    Full text of message: While executing onLoad in_opOpen.htm, the following Javascript error(s) occurred: In file "_opOpen": onOpen is not defined
    If I click ok in the alert,
    The following translators were not loaded due to errors:
    ASP.html has configuration information that is invalid.
    Data.htm: has configuration information that is invalid.
    ICERegionals.htm has configuration information that is invalid
    Not sure how these were corrupted. How do I fix this problem? The resolutions I've found on line are not working.An example: delete the file called ‘WinFileCache-[random numbers].dat’.. That did not work. I'm using Windows 7 Professional.

    If you've already tried clearing the cache file and personal config folder: Deleting a corrupted cache file
    A good next step would be restoring preferences: Restore preferences | Dreamweaver CS4, CS5, CS5.5, CS6
    Here are some other troubleshooting steps: http://helpx.adobe.com/dreamweaver/kb/troubleshoot-javascript-errors-dreamweaver-cs4.html
    If nothing works, a clean reinstall will probably do the trick: Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6

  • Flash CS5: Slow to save files

    Is anyone else finding it very slow to save files in Flash CS5? I've gotten in the habit of saving often, probably from dealing with CS4 being so unstable. It's now habit that I hold down command and hit S then Return every time I test a movie. Yet with CS5, saving a file is no longer immediate. I'm on an 8-core Mac Pro with 12GB RAM, working with a 60MB FLA, and it takes at least 7 seconds to save the file, complete with progress bar. This may not sound like a lot, but if I -- make a change / save the file / test the movie -- and repeat that over and over again, those seconds add up. It's odd because CS4 saved files so fast it didn't need a progress bar and I never noticed a delay.
    I suppose one solution is to get over my CS4 fears and not save as often, but I don't quite have that level of confidence yet!
    Is this happening to everyone or just me?

    Hi Stiv41,
    I would say that there might be some case where saving a file in CS5 could take a bit longer, but it really depends what you have inside your file. This is especially true if you import lots of assets inside your document. With the introduction of XFL, we are now importing the asset but also saving a copy of that asset inside the document structure. Having that extra copy could take a bit longer to save, but you have now the ability to share the document along with all the assets, and those assets can be edited very easily.
    Note that usually the first save is going to be a little slower, but subsequent saves should be much faster. The first time we need to create the XFL document structure, but on subsequent we try to only save what has changed. Of course sometimes we'll need to resave the entire document depending on what changed.
    Also saving as Uncompressed should not make much of a difference at all.
    Finally I would say that a 60 meg Fla file is fairly large. I mean if you have 60 megs of drawing that one thing, but 60 megs worth of assets you might want to consider linking them instead. Since you probably want to publish a small swf.
    -Valerio.

  • Run out of Hard Drive space using Premiere Cs5- Can I save my work, buy and new hard drive?

    I am in the middle of a project using premiere cs5 and I have run out of hard drive space. Can I save it, buy a new hard drive and install Premiere and then reopen it again without  it effecting my project?

    If you are talking about only having one drive for Windows and programs AND video data and project files, a better option is to buy a second drive and move your projects and video data files to the new drive

Maybe you are looking for

  • How do run iPhoto from an external hard drive?

    I've moved my entire iPhoto library to an external hard drive and now can't remember how to open up iPhoto from that drive.

  • Windows application exports to Excel - Parallels

    I have two Windows programs I export files from into Excel.  Quickbooks and Business Plan Pro.  Do I have to install Windows versions of Office or can I configure where the export comes over to Office for Mac?

  • Releasing Purchase Requisition

    Hi All, Here is problem with workflow....when user release the purchase requisition, it takes aroud 12 hours for the requisition to go from the inbox, also when requisition gets deleted it stays in the inbox. Can you please suggest me some solution?

  • I am using MacBook Pro OS 10.6.8. I need a compatible CD/DVD burner. Can someone recommend one?

    Can someone recommend a compatible CD/DVD burner for a MacBook Pro? I have returned two burners, so far, that were not compatible,.

  • Photos out of Focus

    When I was first using iPhoto '11 I realized that while editing my photos they looked out of focus. If I went to the next photo and came back to the same photo I was just editing. The edit was complete and the photo was back in focus. Yesterday I did