How to tell script colse all files and save, but no untitle docs

Hi everyone 
I want to colse the open files and save them but no those files which have never been saved.
I try this script but after ran, all the files are no be saved.
        var docs = app.documents;
             for (var i = docs.length-1; i >= 0; i--) {
                 if(app.activeDocument.saved == false){
                       docs[i].close(SaveOptions.NO);
                 else if(docs[i].close(SaveOptions.YES));
can someone tell me what's wrong with the script?
thanks
Regard
Teetan

var docs = app.documents;
for (var i = docs.length-1; i >= 0; i--) {
    if (docs[i].saved == false) {
        docs[i].close(SaveOptions.NO);
    else {
        docs[i].close(SaveOptions.YES);

Similar Messages

  • Cant unninstall lightroom 5.4 needed for install update 5.5, i have delete all file and registry but install fails

    Cant unninstall lightroom 5.4 needed for install update 5.5, i have delete all file and registry but install fails again and again, now i i cant use lightrrom .. grins.
    I use SSD disk and i cant have lot of uninstal file (have to clean disk often)
    Thanks for help

    Hello Jeff,
    Many thanks for your answer, i use windows 8.1! I have found the problems: For install the news version the install need the old installer (but i delete all installer, cause they use a lot place on hard drive  (SSD)).
    I have desinstall the whole Adobe and réinstalled it, i have save the whole installer on a external disk. So when the installer asked the old installer i indicate to programm my external disk ans all works good now.
    Many thanks for you help, i have just do not to delete old file (sad to have to save old installler just for install the new).
    Wallie
    (sorry my english)

  • When I try to same an image under the command 'save as' it will only let me save as file types 'firefox document' or 'all files' and when I try to look at them later they dont work. How can I save an image as the same file type it is on the web site?!

    When I try to save an image under the command 'save as' it will only let me save as file types 'firefox document' or 'all files' and when I try to look at them later they dont work. How can I save an image as the same file type it is on the web site?!
    == This happened ==
    Every time Firefox opened
    == I updated to one of the firefox versions (Not sure which one it was)

    Thanks Alex, but sadly I already tried that. Neither .docx or .xlsx files show up in the content list. They both show as a Chrome HTML document so changing how Firefox addresses those doesn't help since it thinks its the same type of file. I don't think I can manually add files into the "Content Type" left side nav.

  • I like the idea of auto back-up for my new iMac, Ipad and PC Netbook, particularly if I can access all files and data stored on any device.  But I have a Conceptronic router.  Will Time Capsule work with this and how?

    I like the idea of auto back-up for my new iMac, Ipad and PC Netbook, particularly if I can access all files and data stored on any device.  But I have a Conceptronic router.
    1. Will Time Capsule work with this and how?
    2. Can my printer USB be plugged in and then shared between the devices?
    3. Can I create a network and how?
    4.  What happend when a visitor logs onto my existing wireless router?
    I'm new to Macs (well a returning user having started with Mac Plus!!) and not very technical.  Any help / advice will be much appreciated.
    Ray

    The key to what you seem to want to do is to be able to get Apple's Time Capsule router to "join" the network that your Conceptronic router.  I believe that works with some third-party routers, but I've never seen a list of those that work in such a configuration and I have no experience with Conceptronic equipment.
    You might be better off with a Network-Attached Storage (NAS) device instead of a Time Capsule.

  • How to bundle all files and directories in a package?

    how to bundle all files and directories in a package?
    i plan to put all image files, .class files and some other files together.and then double click the package to execute the program.
    should i use jar?is there a link for tutorial or example?
    thanks in advance

    http://java.sun.com/docs/books/tutorial/jar/

  • How can I sort all files and folders by size?

    Due to lack of space I need to find the biggest files and folders on my Mac OSX Mountain Lion, but "Size" is not in the Find options.
    And I don't know the wildcard to sort all files and folders by size in Easyfind.
    Thanks
    Sarah

    There are applications out there which are designed to show you files and the space they use.  Some of these applications and some strategies for making more room on your disk are given below.
    Freeing Up Hard Disk Space
    Freeing space on your Mac OS X startup disk
    Clearing Disk Space on Your Mac
    Seven ways to free up drive space

  • I transferred files and photos from MacBook to iMac via ethernet cable and using migration assistant. However every time I transferred, it created a separate user and it transferred all files and photos again and again. So now I have 3 users accounts ?

    I transferred files and photos from MacBook to iMac via ethernet cable and using migration assistant. However every time I transferred, it created a separate user and it transferred all files and photos again and again. So now I have 3 users accounts with all files and photos saved 3 times on same iMac !! Any idea how to avoid this ?

    Yes, you ran into a very understandable problem.
    When you use Migration Assistant, it cannot over-write the account that you happen to be using at the time. Upon migrating accounts, it will tell you that it is going to create a new one, but that message is easy to miss.
    If you have three identical accounts, log in to the account you want to keep, and delete the redundant ones in System Preferences > Users & Groups.
    Now that you know, the easiest way to migrate accounts is to use Setup Assistant when you first get a new Mac. That eliminates any possibility for this to occur, but most people are so eager to use their new Mac that they elect to migrate later.
    That's OK too, but in that case you would want to create a temporary account whose sole purpose is to run Migration Assistant so that you may migrate your old one with an identical name. Be sure to give the new account Administrator privileges. When that finishes you would log in to the newly migrated account, and delete the temporary account.

  • Can I delete all files and users (including admin account) without re-installing SL?

    I have a 1st generation Macbook Air, running Snow Leopard 10.6.8.  Just bought myself a new MBA, want to sell the old one (privately, not soliciting here).
    The original install disks were Leopard.  I bought a family pack SL and upgraded the MBA at that point.  Earlier this year I sold my old Mac Mini (when I upgraded) and included the SL install disks with that sale (stupid of me).
    Now I want to sell the old MBA.  Ideally, I'd have a clean install on SL on it, minus all previous files and accounts.  I've done that before when selling old computers, reformatted / erased the HD, then reinstalled the OS.  But I don't have the SL disk anymore, and I don't really want to pay for it just to prep this notebook for sale.
    AFAICT, my options are:
    wipe the HD and reinstall Leopard (the only OSX disks I have).  Whoever buys it from me would need to upgrade to SL themselves, and from there to Lion if they want.
    somehow try to delete all files and users without touching the current install of SL.  I'm not terribly worried about security of what little information is on the MBA (nothing important to me), so I don't mind trashing files and then emptying trash instead of wiping the HD block by block. 
    Any ideas for how to do #2?  I can trash all files/folders under /user, uninstall all applications and delete their folders from Library, uninstall all browsers except Safari and wipe the history from that...
    Is there other stuff I should be deleting?  plist files, maybe?  I'm leery of messing around too much and disrupting the install of the underlying OS.
    Can I also delete the admin account (or rename it "admin" with a generic default password?)?
    Any other suggestions?  Thanks.

    Trashing files you have created is relatively easy. Getting rid of an account is a bit harder. Trashing the .plist files, etc., that may contain personal info is a lot harder, and there is always the risk that you will miss something.
    Best, and easiest, and customary, is to do option #1 - wipe the drive and re-install the original OS from the original disk set. The receiver of the machine can then decide which OS they want to upgrade it to, and purchse accordingly.
    The original disk set for that machine should be included with it when it is sold.

  • HT1923 This article contains the only thing that worked for me.  I also had to sign out of iCloud and uninstall it.  Then I had to delete all files and folders from all of those applications that were under Program Files, Program Files x86, and Users.

    This article contains the only thing that worked for me.  I also had to sign out of iCloud and uninstall it.  Then I had to delete all files and folders from all of those applications that were under Program Files, Program Files x86, Program Data and Users.  My iPhone 4 will now sync with iTunes both in its USB-connected  mini dock and over Wi-Fi.  It's unfortunate (negligent programming on the part of Apple?) that the upgrade to iTunes 11 did not remove all of those files as part of the upgrade process. 

    I am having the same issue....Same address for years - same as USPS - I tried 5 times (3 macs and 2 iPhones) and now i have 5 CHARGES for 1.00 each on my credit card. I took the credit card info off so they don't charge me anymore. How can they charge me yet still not allow me to download free updates and say I have an invalid address? I'm sure I will spend weeks or months trying to get a credit out of these incompetent idiots.

  • IN Premiere Pro CC how can I group copy all files in time line to another part of the time line

    How can I group copy all files from one part of the timeline to another part

    From the Premiere Pro manual (I believe track targeting matters, too.  That is, the targeted tracks only are copied): 
    Copy command enhanced to operate on a range in a sequence
    The existing Copy command (Edit > Copy, Ctrl+C (Windows), Command+C (Mac OS)) is enhanced when used in the Timeline panel. If there are no clips or keyframes selected, and an In Point or Out Point is set, then the range of time between the In point and Out point is copied to the clipboard.

  • Lost all files and folders on the desktop and also in time machine

    All files and folders on the desktop disappeared, I checked time machine and even there are no longer present, even going back months.
    How is it possible?

    After update osx yosemite 10.10.1

  • How do i wipe off all files on my mac air with osx 10.6.8

    how do i wipe off all files on my mac air with osx 10.6.8

    You use its install drive to erase the drive and install a new OS.
    (68136)

  • My ITunes got corrupted and I kept getting a message when updating iTunes64msi missing so I uninstalled all files and I thought I removed all registry values but  when reinstalling I get an older version is installed and cannot be removed. I need a soluti

    My ITunes got corrupted and I kept getting a message when updating iTunes64msi missing so I uninstalled all files and I thought I removed all registry values but  when reinstalling I get an older version is installed and cannot be removed. I need a solution.

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any Bonjour entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • How can one  read a Excel File and Upload into Table using Pl/SQL Code.

    How can one read a Excel File and Upload into Table using Pl/SQL Code.
    1. Excel File is on My PC.
    2. And I want to write a Stored Procedure or Package to do that.
    3. DataBase is on Other Server. Client-Server Environment.
    4. I am Using Toad or PlSql developer tool.

    If you would like to create a package/procedure in order to solve this problem consider using the UTL_FILE in built package, here are a few steps to get you going:
    1. Get your DBA to create directory object in oracle using the following command:
    create directory TEST_DIR as ‘directory_path’;
    Note: This directory is on the server.
    2. Grant read,write on directory directory_object_name to username;
    You can find out the directory_object_name value from dba_directories view if you are using the system user account.
    3. Logon as the user as mentioned above.
    Sample code read plain text file code, you can modify this code to suit your need (i.e. read a csv file)
    function getData(p_filename in varchar2,
    p_filepath in varchar2
    ) RETURN VARCHAR2 is
    input_file utl_file.file_type;
    --declare a buffer to read text data
    input_buffer varchar2(4000);
    begin
    --using the UTL_FILE in built package
    input_file := utl_file.fopen(p_filepath, p_filename, 'R');
    utl_file.get_line(input_file, input_buffer);
    --debug
    --dbms_output.put_line(input_buffer);
    utl_file.fclose(input_file);
    --return data
    return input_buffer;
    end;
    Hope this helps.

  • TS4036 how can I view backed up files and delete things I don't need

    how do I view backed up files and delete thing I don't need

    You can't view individual files contained in the backup.  You can control which apps are backed up, and whether or not the camera roll is included in the backup, by going to Settings>iCloud>Storage & Backup>Manage Storage, tapping the name of your device under Backups, then looking under Backup Options.

Maybe you are looking for

  • Any ideas on how to make program simpler?

    This program is designed to send multiple TTL pulses to different instruments, while at the same time receiving and analyzing analog input data.  We will likely be sampling at fairly low rates (rarely over 100 Hz).  We will be getting a new USB board

  • Re: N8-00 Belle Refresh

    Hi there, We are located in the Boston area, USA, carrier is T-Mobile. Question: Are we going to be able to update to "Belle Refresh" ? When checking for updates, we are told that we are "updated", however, when looking the  Device Manager, it tell u

  • Apache x86 wont start with CF9.01 x64 on win2k3 x64. wsconfig question.

    Hey, I'm running a virtual windows 2003 x64 with Apache 2.2.16 (x86) and i want to connect my apache to cf9 with the wsconfig tool. It places a mod_jrun22.so in my /lib/wsconfig/1/ folder and changes my httpd.conf. That works just fine. But when i st

  • Touchsmart tx2 1160ea only showing single touch in windows 7

    as stated above i have just updated to windows 7 32bit ultimate, and i can use multi touch to zoom and things like before but non of the windows 7 things work, like the multi touch in paint and windows explorer. The notebook is a touchsmart tx2 1160e

  • Extend Airport extreme network

    Hello all, I have the latest airport express router and just recently bought a airport extreme 5th gen. I wish to extend my wireless network right upto my kitchen where the signal strength is poor. Do I have to use a wired connection from my airport