How to say the script colse all files and save them, but not untitle docs

Hello world

I want colse open files and save them, but not the files that have never been saved.

Try this script, but I ran after, all files are not saved.

docs var = app.documents.
for (var i = docs.length - 1; i > = 0; i--) {}
if(App.activeDocument.Saved == false) {}
docs [i]. Close (SaveOptions.no);
}
Another yew (docs [i] m:System.NET.Sockets.Socket.close (SaveOptions.YES));
}

can someone tell me what is the problem with the script?

Thank you

Respect of

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);
    }
}

Tags: InDesign

Similar Questions

  • Remove the lock on all files and folders...?

    There has been a lot of questions on how to remove locks on folders and files on Windows 7. Those I've read on this site worked and the lock can be removed easily.

    ... However, you cannot do a folder/file at once. I have a lot of items on my desk, and more than half of them have these locks on them. How I removed the locks on all files and folders on my user account. There are only 2 accounts on the computer. Mine and another person. Mine is set to the administrator account, the other is just a standard user. I started by ignoring the locks for months, then I tried to get rid of them by myself, and frankly, I have no idea what I'm doing. Please, I beg you. If you know of a way, share it!

    If the locks would not constitute an obstacle to operations, why bother?

    And BTW, it; s no need AT ALL to run as an administrator on a daily basis in Windows 7. Forget everything THAT you have learned about XP - Win 7 is much more advanced.

    You realize that the built-in Administyrator account is disabled by default, and if it is possible for him, that may be beyond what you're comfortable with?

    Create another Admin account, call the Admin or Tech or similar and give it a password. Let this accouynt for the elevation of access and privilege of emergency and activate your account for daily use in a Standard user account. Your computer will be safer that way.

    If you find my answer helpful, please click the button "Vote as helpful"! Thank you!
    My Blog

  • How can I open 2 different pdf files and show them separately on 2 different monitors?

    How can I open 2 different pdf files and show them separately on 2 different monitors?

    Hi thomasr1953,

    You will need to uncheck 'Open documents as tabs... new' under ' Edit > Preferences > general "so that the two PDF files open in separate windows.

    Then, you can drag the second file to the second monitor.

    Kind regards

    Ana Maria

  • I can't open my apps in creative cloud; whenever I get the trial version and the question to purchase. But I am a member for several years now. We have already removed all apps and installed them, but it does not work. What should do?

    ?  I can't open my apps in creative cloud; whenever I get trial versions and the question to purchase. But I am a member for several years now. We have already removed all apps and installed them, but it does not work. What should do?

    Troubleshooting FAQ: What should I do if I have a subscription, but my application acts as if I had a trial?

  • How to remove the security of all files?

    Hello

    Actually for security reason, that I have applied security measures on my D drive, I just requested that no one can access D drive on my PC, but this security has been applied to all folders, subfolders and files all separately in my D drive, now I am unable to remove it... If I try to remove it, its really laborious ' coz I have to remove each file separately and I have thousands of files... Please help me out... .any one operation which may remove the security of all files?

    You can try this on the D partition / drive or all personally created folder/s

    http://www.SevenForums.com/tutorials/1911-take-ownership-shortcut.html

  • How can I automate generic opening EPS files and save in TIF?

    Hello

    I am trying to automate the process of opening files EPS Genric 100 and save them as targets. One of the things is that I need to rasterize these files at 1200 dpi (not the default 72 dpi) and I want off anti-aliasing. I tried to use actions without luck, and I touched my feet in the scripts, which I know absolutely nothing. Here is the script that I copied from another post and changed, and is then lower than that I received the error message. Anyone have any ideas? I use CS4.

    var epsOpts = new EPSOpenOptions();

    epsOpts.antiAlias = false;

    epsOpts.mode = OpenDocumentMode.CMYK;

    epsOpts.resolution = 1200;

    epsOpts.constrainProportions = true;

    #target Photoshop

    app.bringToFront;

    var InFolder = Folder.selectDialog ("~ jesse$ / Volumes/Iomega\ hand/Current\ projects/Stone\ soup/Stone\ Soup\ guide\ 10/Images\ 2/Test ');

    if (InFolder! = null) {

    List of files of the var = inFolder.getFiles (/ \.) ((EPS)) $ / i);

    var outfolder = new Folder (decodeURI (inFolder) + ' ~ jesse$ / projects/Volumes/Stone\ the hand/Current\ of the Iomega\ soup/Stone\ Soup\ guide\ 10/Done ");

    if (outfolder.exists == false) outfolder.create ();

    for (var a = 0; a < fileList.length; a ++) {

    if ([a] instanceof file fileList) { }

    var doc = open (fileList [a], epsOpts);

    var Nomdoc is fileList [a].name.slice (0, -4);.

    while (app.documents.length) { }

    saveFile var = new queue (decodeURI (outfolder) "/" ".tif"+ docname);

    SaveTiff (saveFile);

    activeDocument.close (SaveOptions.DONOTSAVECHANGES);

    }

    }

    }

    };

    function SaveTiff (saveFile) {}

    tiffSaveOptions = new TiffSaveOptions();

    tiffSaveOptions.embedColorProfile = false;

    tiffSaveOptions.imageCompression = TIFFEncoding.TIFFLZW

    activeDocument.saveAs (saveFile, tiffSaveOptions, true, Extension.LOWERCASE);

    }

    Screen shot 2012-12-14 at 11.40.25 AM.png

    Thank you in advance for your help!

    -Jesse

    The script is not clear. Try to use the ExtendScript Toolkit, which is installed with Photoshop. You use the text editor is the addition of control characters.

  • Download the pdf or jpg file and save it on the device for consultation offline

    Hello

    Publication of an AIR for iOS app via Flash CS5.5, anyone know if it is possible to download a pdf or jpg file and save it on the device for consultation offline?

    If so, could you give me some advice on the relevant categories?

    Thank you

    Mark

    Save the content of the loader in byte array, and then send this byte array to FileStream

    Something like:

    mcLoader = new URLLoader();

    mcLoader.dataFormat = URLLoaderDataFormat.BINARY;

    var req:URLRequest = new URLRequest (file);

    mcLoader.addEventListener (Event.COMPLETE, contentLoaded);

    mcLoader.load (req);

    private void contentLoaded(e:Event):void {}

    var dataContent:ByteArray = new ByteArray();

    dataContent = e.target.data;

    var fileName:String = "mylocal.pdf".

    var f: File = File.applicationStorageDirectory.resolvePath (fileName);

    Save the file in the local space

    If (f.exists == false) {}

    trace ("file does not exist. Record file');

    var fs:FileStream = new FileStream();

    FS. Open (f, FileMode.WRITE)

    fs.writeBytes (dataContent);

    FS. Close();

    trace ('saved');

    }

    }

  • How to tell the script that I want to save unsaved files, but not to replace the old?

    Hello world

    I had this script

    docs var = app.documents.

    for (var i = docs.length - 1; i > = 0; i--) {}

    If (.saved docs [i] == false) {}

    docs [i] except (new File("~/Desktop/Document.indd'));

    docs [i]. Close();

    }

    else {}

    docs [i]. Close (SaveOptions.Yes);

    }

    }

    Close and save files

    But if I have two files or more, I want to save the files as Doc1, Doc2...

    the new file will never replace the old

    Can someone tell me how I can do?

    Thank you

    Respect of

    Teetan

    Hello

    The 4th line change as below:

            docs[i].save(new File("~/Desktop/Doc" + (i+1) + ".indd"));
    

    Vandy

  • How to make the script a buttons previous and next to navigate between fields using the navigation sequence?

    I want to put in "next" as well as "Previous section" buttons on the top of my page, aside from the arrows in the table of contents. I put a browse sequence. But I am unalbe to describe the buttons. Can anyone help please.

    Thank you.

    Hello

    You're definitely on the right track. The problem is that you cannot use a path "hard" for images. It may work for the subjects to the root, the directory images can exist. It may not work for the subjects, because the correct path would be something like '... /... / Images /'.

    In addition, you must add the images as baggage files to your project. If you only use the images in a script, RoboHelp does not recognize them as resources.

    I've updated you above the article. He now understands how to use images like browse buttons in the sequence.

    Take a bow

    Willam

  • How to restore the ability to download files and documents?

    End of last week I noticed that I had accumulated a large number of cookies. I decided to clear the cookies and history by selecting «Clear history of Firefox closing» I deleted cookies and closed Firefox. Firefox has started closing but stop responding before the end of the fence. I forced Firefox to close (Mac OS X 10.6.8) then restarted Firefox which has always failed. I unchecked 'Clear history of Firefox closing' and Firefox resumed normal operation except that I am now unable to download files and documents from any web site. I tried another browser (Safari 5.1.5) and downloads are normal.

    Any help much appreciated.

    -Joe

    COR - el,

    The problem I had was with a plug-in, I received in the most recent update of Adobe Reader I installed at the same time, my problem started. Thought you might like to know.

    -Joe

  • How to download all updates and save them for use on other PCs,

    I have 6 what IBM Thinkcentres licensed with XP Professional and the new hard drives. I loaded SP3 and Office Basic, but several updates are needed to update XP, Office, etc. Is there a way I can download all required updates and save for use on all computers, so save bandwidth?

    How to download drivers and updates from the Windows Update Catalog or the Microsoft Update Catalog:
    http://support.Microsoft.com/default.aspx?scid=kb;en-us;323166

    Store updates local Windows for the following facilities - http://windowsxp.mvps.org/saveupdates.htm MS - MVP - Elephant Boy computers - Don ' t Panic!

  • How to rotate the numbers in a circle and keep them like numbers on a clock face.

    Please can someone help me with my question.clock face.jpg

    Draw a crircle. It cracks. No fill, no respect

    Draw a rectangle and make a copy of it. The box should be large enough to contain the largest number.

    Select all, melt.

    On mixture not the number of objects that you need. The original two will be stacked on each other, so you need an extra.

    Make a copy so that you can easily return.

    depends on how you drew the circle you will need to take over the management of mixture.

    Expand one of your mixes.

    Disassociate.

    Remove the duplicate object.

    Select all of the check boxes on the circle and Type > threaded text > do

    Type the numbers with a return as a divider in the boxes. Format the text.

  • After the migration of profile, files can be seen but not read

    1 screenshot shows the folders as expected, but the choice by clicking on it does not reveal the 2 messages) the other tabs (created from a previous installation) show the correct data 3) menu option help / troubleshooting work ok - exit attached 4) another menu option do not work (for example "Help / About" does nothing) 5) I am running under a brand new installation of Linux Mint 17 / cinnamon - have tried to uninstall / re-Setup version 6) installed is 1:31.6.0 + build1 - 0ubuntu0.14.04.1 7) ~/.thunderbird contains two profiles, dw6qkyib. News and q0vb0h3j.default. Profiles.ini points to the latter

    (Already posted same question under [email protected], but not able to access the verification email - downloaded from the mail server and lost in the black hole!)

    The problem seems to have been using the old profile. Not only it has resulted in access to messages becomes incredibly slow, some of the meu options stopped working completely (e.g. tools / address book, help / about).

    After a discussion on the Linux Mint support forum http://forums.linuxmint.com/viewtopic.php?f=47 & t = 195264 & sid = b8b72a18e053f2f03dfe0e11cf21a59e I created a new profile and solved the problem.

  • Disabling download option / how to limit the download of all files in OBIEE 11 G

    Hello

    Is it possible that I can disable the download option in OBIEE 11 G answers?

    I am currently OBIEE 11 g answers URL, be able to download any file as .txt, .xls or etc. which is a vulnerability for us.

    How to limit it?

    Appreciate your input on this. Please let me know as soon as POSSIBLE.

    Thanks and greetings

    Olivier

    Connect to OBI-> Administration-> Manage privileges-> catalog-> download files

  • IM connected to an old hard drive and I can't pull the top of all files and the document that are saved on it that I hurt myself?

    problems connecting to seprate hard drive what can I do?

    What exactly happens when you try to retrieve files?

    If you get an "Access denied" message, please see how appropriating a file or a folder in Windows XP , which also applies to Windows Vista and Windows 7.

    Boulder computer Maven
    Most Microsoft Valuable Professional

Maybe you are looking for

  • Envy 15-j112tx: No. drivers for my laptop

    Hi there everyone, I recently updated my laptop to Windows Pro 8.1 8.1. But before even that I have updated I went on HP support site to see if I could get some drivers to make it easier after the upgrade, but the site says "we have to find the drive

  • Pavilion dv3500 - FZ941PA #ABG: time Internet will not sync automatically

    Hello! Good day again! My time Internet is not synchronized automatically, so in everyday life I always synchronize it manually, I follow some sites about procedures, they synchronize but not automatically and also in the registry, I try to change it

  • where are the visualizations for windows media player

    WHAT HAPPENS ONSCREEN VISUALITION FOR MEDIA PLAYER? before you could play a song and there was a screen that had Visual afffects who played with music not it not there what happen to it for my beloved part can I get it back Sincerely David Swoveland

  • Windows updates not moved

    I get an error code of 646, even though I turned off my firewall Spysweeper both my Windows Firewall.  Not only that, but before when I could install the updates, my computer would freeze.  Is this normal and is there a solution?  I have asked other

  • Windows Search draws BIG &#62; 3GB WINDOWS. EDB file, even when the search service is disabled!

    Search for Windows XP generates a very large WINDOWS. Index EDB file (> 3 GB).  At first, it seemed to be a 5 GB OUTLOOK indexing. PST file *, however, I disabled the indexing service and unchecked the "allow Indexing" box on all disks and uncontroll