How to open indesign files and close

i want to open indesgin files exist in the folder and i want to open all the files one by one and i want to close wht are the files i opened
could anyone tell me.

The following script does exactly that.
var fileLocation = Folder.selectDialog("Select a folder");
folder = new Folder ([fileLocation]);
folderContents = folder.getFiles("*.indd");
var openedFiles = new Array;
var filenames = new Array;
for (i=0; i<folderContents.length; i++)
filenames.push (folderContents[i]+"\n");
openedFiles.push(app.open (folderContents[i]));
str = filenames.join();
if (confirm ("Close "+str) == true)
for (i=0; i<openedFiles.length; i++)
  openedFiles[i].close();
As you can see, you are responsible yourself  for keeping a list of the files you opened. But with that list, you can do some interesting stuff -- such as closing the same files again.

Similar Messages

  • How to open .rar files and .exe files on mac

    HI
    I'm new user on mac and would like to know how to open .rar files and .exe files on MAC OS X
    Thanks

    How is this a Compressor question?
    .exe is a Windows only Executable, and can't be opened on a Mac, unless you have Windows installed.
    Michael Trauffer

  • How to open an URL and close the URL window, using adobe javascript

    Hi,
      Is it possible to open an URL and close the URL back again(without allowing the user to perform any other operation)? I was able to acheive the opening of the URL, using the app.launchURL("address". true); - But here it lauches in new window, and how do i close the window using the javascript. Is it possible?
    Thanks.

    Hi all
    In addition to what Bobby W - Adobe TS added, you might find
    the following useful as a bypass or workaround to the pesky prompt.
    var pw=window.parent;pw.opener=window.self;window.open("
    http://www.adobe.com");
    pw.close();
    I think this will only work for IE browsers. Actually, I
    think the whole window.close() only works for IE, but could be
    wrong about that.
    Cheers... Rick

  • How to open a file and display the complete file path?

    In my script, I want to create a dialog that prompts the user to define a few variables for the script. One of those variables is the path to a template file. I want it to work the same way that an upload form works. You click the browse button, the dialog appears so that you can browse for the file and then when you click OK or Open, the full path of the file is displayed in the text box next to it. How do I do this with JavaScript? I got this far and it seems to be working, but the wrong text is being displayed in the text box. Plus: How do I properly restrict the file types to PSD. The code doesn't seem to work, despite the fact that there are no errors reported. Initially the Text box is blank, but After I browse for the file, the text box says: "File". Here is the problem area:
    defineVars.STPnl.STBrowse.onClick = function browseST() {
    var stbFile = File.openDialog("Select the Single Mugshot Key Template File", "File Types: *.psd, *.PSD");
    defineVars.STPnl.STPath.text = stbFile;
    Thank you to whoever assists me! :)

    Change this:
    defineVars.STPnl.STPath.text = stbFile;
    To this:
    defineVars.STPnl.STPath.text = stbFile.fullName;
    The reason is that stbFile is a File object, you need to access its properties in order to get the full path.

  • How to open .divx files and AC3 codecs?

    Hi,
    I am new at Macbook. I just got it one week ago, and i dunno how to use it, but I love my mac...
    My question is how can I play .divx files, and some of the movies I have coded with ac3, so how can I play them?
    thanks,

    Hi ecetin and welcome to the forums!
    Congratulations on the new macbook - I hope you will both be very happy!
    Here is the 'full nine yards' on what you need:
    These are the downloads and the settings you need in order to view/hear pretty much everything that the net can throw at you: The setup described below has proved repeatedly successful on both PPC and Intel macs, but nothing in life carries a guarantee!
    It is known to work in the great majority of cases with Safari 3.0.4, 3.1, 3.1.1, QT 7.3, 7.4.x and 7.5 and OS 10.4.11.
    Assuming you already run Tiger versions OS 10.4.11 and have Quicktime 7.4 or above, and are using Safari 2 or 3, download and install (or re-install even if you already had them) the latest versions, suitable for your flavor of Mac, of:
    RealPlayer 11 (which is no longer in beta) for Mac from:
    http://www.versiontracker.com/dyn/moreinfo/macosx/15540
    Flip4Mac WMV Player from http://www.microsoft.com/windows/windowsmedia/player/wmcomponents.mspx (Windows Media Player for the Mac is no longer supported, even by Microsoft)
    Perian from http://perian.org/
    You should read this support page http://perian.org/#support in case you need to delete older codecs.
    Adobe FlashPlayer should first be uninstalled using the appropriate uninstaller available here:
    http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14157&sliceId=2
    and then the latest version obtained from here:
    http://www.adobe.com/shockwave/download/download.cgi?P1ProdVersion=ShockwaveFlash
    and installed.
    (You can check here: http://www.adobe.com/products/flash/about/ to see which version you should install for your Mac and OS, but please see my footnote if you are running Leopard.)
    In earlier versions than QT 7.1.3 in Quicktime Preferences, under advanced, UNcheck Enable Flash, and under Mime settings/Miscellananeous only check Quicktime HTML (QHTM).
    You should also ensure, if you are running Tiger 10.4.11, that you have downloaded and installed all the correct version for your Mac of Security Updates up to and including 2008-004. (N.B. Security Updates require both a restart and a permission repair.)
    In Macintosh HD/Library/Quicktime/ delete any files relating to DivX (Perian already has them). However it should be noted that Perian is not an internet plugin and will not play DivX files imbedded on a website. For that you will need the DivX Player browser plugin available from http://www.divx.com/divx/mac/
    Now go to Safari Preferences/Security, and tick the boxes under Web Content (all 4 of them) to enable Java.
    Lastly open Audio Midi Setup (which you will find in the Utilities Folder of your Applications Folder) and click on Audio Devices. Make sure that both Audio Input and Audio Output, under Format, are set to 44100 Hz, and that you have selected 'Built in Audio'.
    Important: Now repair permissions and restart.
    You should also consider having the free VLC Player from http://www.videolan.org/ in your armory, as this plays almost anything that DVD Player might not.
    There is an additional 'fix' you could try if you are having problems with Flash and Quicktime, depending on which type of Mac you have:
    On Intel Macs, make sure that you are not running Safari in Rosetta. You can check this, and change it, in the Get Info window.
    On PPC Macs, go to the Hard Disk/Library/Internet Plug-Ins folder, and drag the file 'QuickTime Plugin.webplugin' to the desktop. Quit and restart Safari. If things have improved you can trash that file. If they haven't put it back, as the lack of this plug-in can cause QT content in some widgets to cease functioning.
    And now there is an additional kid on the block: SilverLight. Microsoft has created their own version of what a replacement for Flash should be. You can read more about it here:
    http://silverlight.net/
    So, if you go to any sites that have been designed for this new Silverlight stuff, you can download the plug-in from here (but make certain that you are downloading SilverLight v.1.0 for OS X (10.4.8 upwards):
    http://silverlight.net/GetStarted/
    FOOTNOTE
    If you are running Leopard:
    Some users have mentioned that the latest Flash Player (v.9.0.115.0) conflicts with Leopard, and that they have needed to revert to v. 9.0.47. This can be downloaded from here:
    http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14266&sliceId=1

  • How to open a form and close another one

    hi,
    I wish to open a form from another, and then close the calling form. In other words, having FORM1 and FORM2, FORM1 should do this:
    OPEN_FORM ('FORM2',ACTIVATE,SESSION);
    EXIT_FORM(NO_COMMIT,NO_VALIDATE);
    but I cant get this to work. As FORM1 is modal, it opens FORM2 but its still open. Changing the order of the two statements only cause FORM1 to be closed. Can I perform the two operations from within FORM1, avoiding to put the EXIT_FORM statement in FORM2?
    thank you

    Hello,
    Use NEW_FORM to replace the calling module.
    Francois

  • How do I write a javascript code to open InDesign File, import Doc, save and export to pdf?

    How do I write a javascript code to open InDesign File, import Doc, save and export to pdf?

    Hi hasvi,
    Need Template(.indt), textframes etc for the following script:
    var myFolderInd = Folder.selectDialog();
    var myFile = myFolderInd.getFiles("*indt");
    app.open(myFile)
    var myDoc = app.activeDocument;
    var myDocName = myDoc.name;
    var mySaveFile = app.activeDocument.save(myFolderInd.fsName + "/" + myDocName.split(".indt").join(".indd"));
    var myFolderDoc = Folder.selectDialog();
    var myFile1 = myFolderDoc.getFiles("*doc");
    mySaveFile.pages[0].textFrames[0].place(File(myFile1))
    //~ mySaveFile.place(File(myFile1))
    app.activeDocument.textPreferences.smartTextReflow = true;
    var myPDFFile = new File(mySaveFile.filePath + "/" + mySaveFile.name.split(".indd").join(".pdf"))
    myDoc.exportFile(ExportFormat.PDF_TYPE, File("~/Desktop/abc.pdf"));
    alert("Process Completed")
    Regards
    Siraj

  • How to get all paragraphs style and their fonts of a  indesign file and write all info with para info into txt file with scripting

    how to get all how to get all paragraphs style and their fonts of a  indesign file and write all info with para info into txt file with scriptingstyle and their fonts of a  indesign file and write all info with para info into txt file with scripting

    I write the script this one works
              var par=doc.stories.everyItem().paragraphs.everyItem().getElements();
      for(var i=par.length-1;i>=0;i--)
           var font=par[i].appliedParagraphStyle.name;
            var font1=par[i].appliedFont.name;
             var size=par[i].pointSize;
            WriteToFile (par[i].contents  +   "\r" +  "Style  : " + font  + "\r" +  "FONT1  : " + font1  + "\r" +  "Size  : " + size  + "\r", reportFilePath);
                            function WriteToFile(text, reportFilePath) { 
        file = new File(reportFilePath); 
        file.encoding = "UTF-8"; 
        if (file.exists) { 
            file.open("e"); 
            file.seek(0, 2); 
        else { 
            file.open("w"); 
          file.writeln(text);  
        file.close(); 
    Thanks for all your support

  • System exec, How I say to open one file and make operation in external program?

    Hi,
    I got called an external program with the system exec.vi, but i would like the program open the file saved in the other window, i can get the file path, but how Can I put the file path in the external program and the program open the file and I tell (in this case compile), since i open one file code c and only i must to open and say to the program 'compile' and then close external program.
    Any help?. Thanks.
    Attachments:
    system_exec.GIF ‏8 KB

    Hi Fonsi,
    System Exec.vi will allow you to run commands like launching a program easily but it is difficult and many times not possible to execute commands within an application.
    A better way maybe to approach this though ActiveX. Please look at the following example that uses ActiveX to communicate with Excel.
    Writing Rows to Excel 97 and Excel 2000 Using ActiveX
    If you are not familiar to ActiveX and LabVIEW, please read the document below:
    ActiveX and LabVIEW
    I hope this
    helps.
    Sincerely,
    Feroz
    National Instruments

  • Because I can no longer open Adobe files, and have tried all obvious solutions, I've been told to defrag the Intel portion of my MacBook Pro. How do I do this?

    Because I can no longer open Adobe files, and have tried all obvious solutions, I've been told to defrag the Intel portion of my MacBook Pro. How do I do this?
    I never use the Intel side, and have never partitioned the MacBook Pro.
    Message was edited by: MacGirl221b

    I never use the Intel side,
    Not understood, Intel make the processor that runs your Mac, there is no other 'side' to your Mac.
    What Adobe application are you trying to open files with?

  • Since the last update my Numbers app in IOS, iPad3 and iphone5 will not open.  It works fine on my macbook pro.  It starts but before I can open a file it closes.

    Since the last update my Numbers app will not load in either my iPad3 or my iPhone5.  It works fine on my MacBook Pro.  The app starts but before I can open a file it closes.  Is this a common problem and do you know hwo to solve it?

    Hi Michael,
    If you've already restarted both your iOS devices after the update and Numbers for iOS still won't load, you might try clearing the documents temporarily out of iCloud, opening the apps, closing them, and then placing the documents back in iCloud.
    To do this, in Finder on your Mac, hold down the option key and then Go > Library > Mobile Documents > com~apple~Numbers.  Move the documents there out to the Desktop or other location of your choosing.  Then give iCloud time to sync.  Then try opening Numbers on iPad and on the iPhone.  If they open, then close them, and move the documents back into  Library > Mobile Documents > com~apple~Numbers and let iCloud sync again.
    That sometimes clears up the problem.
    SG

  • Can TestStand open, read, write and close binary files?

    From a TestStand sequence, I need to open, read, write and close binary files. Does TestStand support this capability?

    Christine -
    In the past I have used the C/C++ Adapter to call directly into the CVI RTE functions. The CVI functions I have used are OpenFile, WriteFile and CloseFile. The functions are exported from the DLL as CVI_OpenFile, CVI_WriteFile, and CVI_CloseFile. I just had to make sure that on termination of the sequence, that the integer handle was properly released by calling the close function.
    If you are using LabVIEW, you could call directly into the low level VIs to do a similar set of operations.
    Scott Richardson (NI)
    Scott Richardson
    National Instruments

  • How do I open png files and maintain transparency?

    How do I open png files and maintain transparency?  I have many image files I had hoped to manage with aperture along with my photos.  I find that it wants to display them with a black bacground( they were designed for white) and when I want to edit that is kept even when I open with a psd format.  What do I do?
    Thanks

    and when I want to edit that is kept even when I open with a psd format.  What do I do?
    Transparency and layers are not supported in Aperture. You can import png-files or psd files with a transparent background and export the originals unchanged, but as soon as you edit them, the transparent background will be lost.
    Aperture is an application to manage photos and not graphics compositions, sorry.
    -- Léonie

  • How open a file and not showing window?

    I write a script to do some work automatic,
    for Indesign script, its application open method could open a file and not showing window,
    the open method has a parameter [ShowingWindow] (if true, show the document window).
    That is good a feature for me.
    But with Illustrator, the application open method hasn't the same feature.
    Open
    (files as String,
    [documentColorSpace as AiDocumentColorSpace],
    [options as Object])
    and for OpenOptions properties, there is not useful information for me.
    Is there any other methods could do that?
    Any help is greatly appreciated.

    Thank for your reply.

  • I want to open a file and have it fill the desktop - how??

    I have recently moved over from CS2 on PC to CS3 in MAC - I used to be able to open a file and it would open up in a full window filling the whole screen - now it opens up in a box with no surrounding space. When I maximize the minute I tap cmd + the widow reduces to minimize and just zooms into a part of the file. I am sure this is basic stuff but any help out there please??
    gratefully
    Angus

    That's the difference between Macs and Windows. Windows opens applications in a... Window.
    Try hitting the F key and see if that works for you.

Maybe you are looking for