Open several files depending on the size of Trim

Hi all

Please help for my application, this should be very urgent.

Request:

1. selection of a user folder

2. open all files

3. recover the Trim size (width of paper) + name of the Document

4. set the width of the Document (lower to higher)

5. yet once open the files according to the minimum width of document

Try the Script:

#target Indesign

var  myFolder = Folder.selectDialog("Select the Folder contains Indesign Files");
var myFiles = myFolder.getFiles("*.indd");
myWidthArray = new Array();

for(i=0; i<myFiles.length; i++)
{
    app.open(myFiles[i]);
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;  
    
    var myDocument_Width = Math.round(app.activeDocument.documentPreferences.pageWidth);
    var myReq = myDocument_Width + app.activeDocument.name;
    
    myWidthArray.push(myReq)
    
    app.activeDocument.close();
    }

alert(myWidthArray)
var myPoints = myWidthArray;
myPoints.sort(function(a, b){return a-b});
alert("myPoints: " + myPoints)


//here need help
for(k=0; k<myPoints.length; k++)
{
    app.open(myPoints[k].document.name)
    }

Thank you

Siraj

Hi try this code

#target Indesign 

var  myFolder = Folder.selectDialog("Select the Folder contains Indesign Files");
var myFiles = myFolder.getFiles("*.indd");
var myWidthArray = new Array(); 

for(var i=0; i

Thank you

Tags: InDesign

Similar Questions

  • New file depending on the size of the current selection?

    Is there a way to make a new file based on the current selection?

    Copy the selection to the Clipboard.

  • Cannot open several files at once

    I meet a strange bug in Dreamweaver CM³.

    When I try to open several files in DW, it opens the same file in multiple tabs. For example: I select index.html and login.html in the root of the site, then open. Instead of ending up with two files, one in each tab, DW opens two tabs on the login.html. If I try to open a third file called main.css for example, it replaces two existing tabs and open a third tab, air-conditioned and with main.css.

    This makes the work on the global site styles and about something very difficult.

    Does anyone have a solution to this problem? I have all the updates of the software currently available.

    Good guys, I found the answer. Very strange bug in the software and the solution found by chance.

    For some reason, the path to the folder root site cannot contain a character #. Perhaps no other special characters either, but I did not test them. My company file structure contains # to name, but it was apparently confusing Dreamweaver.

    Thanks for all your suggestions however.

    No symbol # in the full path to the root of the site = operation DW.

  • Open several files at once

    I have a user who is trying to open several files at once in IllustratorCC. When you select several files and right click-> open, it opens to a single file. If she double clicks on a file so that it has a file open in illustrator, nothing happens. The only way she found to open several files is to go to file-> open-> Browse to the location for each file. It's your time. Is anyway to allow to quickly open multiple files similar to how older versions of Illustrator has done?

    It should work the way it does, unless something is broken in CC

    try these other two options

    1. Select all the files and press 'Enter', they should all open

    2. Select all files, and then press the 'Open' button in the toolbar of the browser

  • What software to use to open a file .igx in the Windows environment

    What software to use to open a file .igx in the Windows environment

    Hi Docsri,

    The IGX file type is primarily associated with ' iGrafx FlowCharter / iGrafx Process' by iGrafx LLC. A graphical process simulation and modeling program.

    You can use the software provided by ' iGrafx IGX to open files in Windows.

    Frequently asked questions

    http://www.iGrafx.com/products/Flowcharter/14/FAQs.html

    Evaluation software downloads

    http://www.iGrafx.com/downloads/trial.html

  • In Windows Mail, I can not open .doc files, I get the error that it was not bound

    In Windows Mail, I can not open .doc files, I get the error that it is not associated, and he tries to search in appdata/IE5 for a reason any.  PDF, PPT, XLS all work fine.  I tried unassoc to unassociate file types for .doc and .docx associate then again these via Control Panel and it STILL does not work.  I'm at the end of my home please help.
    Nicki

    I had to remove the regedit.  for some reason the mail windows refuses to unassociate so go to regedit, I don't like playing with regedit, but it worked, I deleted and then again, all ok now.

    Thanks for the help!

  • How to tune a myself to several files/folders at the same time?

    • I have a lot of music and video files that have suddenly become unresponsive to any media player after a connection Xbox Media Center (music/videos appear, but no action follows after that as they are accessible, media players and the Xbox Media Center don't always work correctly).
    • I can play one song/video after changing its properties (security permissions), which gives full control to me, the administrator manually. -Too much work for 4000 + files.
    • My current media player is iTunes, but also Windows Media Player fails to play the music/videos.

    Thanks for the reply, but I need to know how to proceed for several files/folders at the same time.  This particular set of directions only explain how to set permissions to a single.

    In Windows Explorer, select all the folders that you want to change the property on, then right click on ONE of these folders (your selections will remain)
    Choose Properties > Security > advanced > owner > edit
    Make your changes and do not forget to check the "Replace owner...". "downstairs.

    With thousands of files, it may take a few minutes. VP Tech Services

  • error message "you don't have permission to open this file. Contact the file owner or administrator to get permission. " I am the administrator and the owner of the file.

    My XP computer crashed and now I have Windows 7 on a new PC.  I downloaded my files from an online backup and now when I try and open a Word document, for example, I get the error message "you don't have permission to open this file.  Contact the file owner or administrator to get permission. "  I am the administrator and the owner of the file. Help!  I am locked out of all my files!

    1. Right click on the folder that you want to take control and then click Properties.

    2. Click the Security tab, click Advanced, and then click the owner tab.

    3. Click on change. If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.

    4. Click on the name of the person you want to give to the property.

    5. If you want that person to be the owner of the files and subfolders in this folder, select the Replace owner of subcontainers and objects to check.

    6. Click OK.

  • Al Convert JPEG file a PDF the size is very large y al conbinarlo con otros archivos is muy disparejo, como hago para los queden JPEG full size?

    Al Convert JPEG file a PDF the size is very large y al combinarlo con otros archivos is muy disparejo, como hago para los queden JPEG full size?

    Hey James,.

    When you convert a pdf document to jpeg format, there are adjustment possibilities using which you can reduce the size of the document.

    Please make sure the fixed screen capture.

    Kind regards

    Ajlan Huda.

  • Why can't I open INDD files using exactly the same InDesign CS6 product I've used to create them?

    I tried to modify the work sent by another designer. He sent me the INDD files (as part of the packages) but I could not open in my version of Windows of InDesign CS6. My computer told me that I had not any software installed that could open the file. While searching on the forums, I thought it could use InDesign CC, that for some reason any crazy I can't open INDD files created using the CC version and so I have to send him the IDML files. OK, fine, he sent me the IDML files.

    IDML files open correctly in my version of InDesign CS6. Large. They open in the form of documents not saved, so I save them as files InDesign CS6. OK, well. Except that I can't open files INDD, that I just created. Yet once, my computer tells me that I don't have any software installed that can open the file. But how can this be? I just create the files using this software!

    If I do a test. I can't open a file that I create from scratch? N ° it seems that I can't open INDD files in my version of Windows of InDesign CS6, even if I create them from scratch. Can anyone help?

    I found an answer here: http://forums.adobe.com/message/2604646

    1. I opened Windows Explorer and went to tools >... Folder Options > File Types.
    2. I selected INDD and click Advanced.
    3. I chose the action open and press edit.
    4. I went to Adobe InDesign (for some reason any, that adobe does not appear in Program Files by default, but if I go to Program Files and then type Adobe in the zone file name and touch open then I can browse the Adobe programs).
    5. I chose InDesign and press open.
    6. Then back in the editing window of action, I added '%1' in the application used to perform action text box, so that all read: "C:\Program Files\Adobe\Adobe InDesign CS6\InDesign.exe" '%1 '.
    7. I entered indesign in the Application text box and then click OK.
    8. InDesign CS6 will now open INDD files. Finally!
  • Save a PDF file that retains the size when opening.

    I start with my photoshop file. I save as pdf. At the opening of the PDF it opens 2 X the size of my orginal photoshop file. I hit then command 0 to see the size of the original, but it is still much bigger than my photoshop file.

    I would like the best viewing experinece to my PDF and I want it opens exactly the size of my photoshop file. It is annoying when it open wide. How can I do this?

    Thank you for your help.

    If you have Acrobat, you can open the PDF file and edit the document properties ".» (CMD - D)

    On the tab 'Initial view', select the 'magnification' favorite.

    Beware that there are limits to the retention of what you perceive as the correct size. Different people have different size poster.

  • Importing several files .csv in the data portal

    I'm looking to import data that contains multiple .csv files in the data portal. I have a code to succeed, which can erase all data from the data portal, open a dialoge box to find new data and open new data using a .csv use. I want to improve this script to be able to have the ability to load multiple datasets in the data at a time portal, but I have a limited knowledge of the VBS coding structure. Can someone advise measures to reach this solution with VBS minimal coding experience? Thank you all in advance for your help.

    Hi dc13.

    The tiara FileDlgShow command has the ability to load several files at the same time. Please take a look by using tiara for more details and an example.

    Greetings

    Walter

  • How to open several files in ACR without bridge

    Is there a way? but not a single file, several files at once.
    Is it possible to open LR as bridge? (Some may wonder why I want to open if I use LR because ACR is similar to LR)

    There is no provision to do so. You are right, however. You can select multiple images in Lightroom and apply the corrections here. But when images to Photoshop Lightroom, Camera Raw only serves to interpret the Lightroom adjustments. Camera Raw itself does not open. Of course, you can open as smart objects. But only allow you to take individual images in Camera Raw.

  • [JS] [CS4] - implementation of an if statement depending on the size of the artboard

    Hello

    I thought it would be relatively easy, but I can't seem to find a way to implement correctly my if/else statement. I want to say, "If the size of the artboard is equal to these coordinates (0,792,1224,0), do xyz." Here is the code that I have that doesn't seem to work.  Just so that I could try to make it work I have export a JPEG image, but that's irrelevant because once I got it working I have several conditions, while if I have a document with several plans of work, I can say different work plans to do different things, based on size. Any help is greatly appreciated. Let me know if osmething makes no sense.

    var doc = app.activeDocument;
    
    if(doc.artboards[0.artboardRect == [0,792,1224,0]){
    
    var destJPG = new File ("D:/Checkout/" + doc.name.split(".ai")[0] + ".jpg");
    var exportOptions = new ExportOptionsJPEG();
    var type = ExportType.JPEG;
    exportOptions.artBoardClipping = true;
    exportOptions.qualitySetting = 100;
    doc.exportFile(destJPG, type, exportOptions);
    
    }
    

    you're almost there

    replace

    if(doc.artboards[0.artboardRect == [0,792,1224,0]){
    

    with

    if(doc.artboards[0].artboardRect == "0,792,1224,0"){
    
  • I use firefox 13.0.1 I open a file, it displays the HTML instead of a web page

    I am writing the HTML in a text file and then saved as a html file. But when I open this file in firefox, it displays the HTML each time I try to open the file.i have tried internet Explorer also but I am facing the same problem. I use windows 7 64-bit OS. I can't find a solution to this?

    Yes, I can reproduce that. If you find and replace the < followed by one space with only < and then reload the page, Firefox he sees now in HTML format. Apparently, these spaces makes a huge difference.

Maybe you are looking for

  • How can I dynamically select the shared Variable API programming data type?

    I am trying to create a configuration of open connections of variable shared using the programming API. It seems to me that the cleanest way to do would be to put one "open and check" routine in a loop, then call it for each variable in the library.

  • [Solved] When you change the file type for RAR files, it also changes the file type of the ISO XP files

    I tried to change the file type description, as well as in default and the icon for the rar and iso programs file types inmenu\ tools\folder options\file typest\advanced, but to change the settings on a file type automatically changes settings on the

  • problem downloading the Mobile Device Center 6.1

    I am trying to download Mobile Device Center 6.1 and he brings me the validation center and I spoke with the Microsoft Genuine Advantage's Department and told me that my copy of Windows Vista is genuine, but still when I try to download the software,

  • the ink cartridge is false

    I bought a new cartreidge of black ink when I opened it it was yellow, he was sealed by the company... Another question that when I got a new one, that it has not been filled the computer gives me a message that the black ink is very low... I got to

  • Request authorization

    Hello I was wondering if the authorization application gets persisted during the restart of the unit? Because, to my request for permission from the first run of the application. But when I removed the battery (reboot), it always ask permission. Than