InDesign CS5 | Create layers and automatically distribute. [script]

Hi guys,.

is there some script for Indesign CS5, which create layers automatically a nd distribute text, images and objects their?

Ex: I have a layer with a lot of pictures and I want to distribute to layers another automatically.

Best regards

JNSaraiva

Hi JNSaraiva

At a glance of your first bid looked like you have three specific objects (image, text, otherObjects) and you want to move all the images a specific layer images and text on another layer objects and rest to another specific layer. If what you wanted then my first code complete final will fill it but in your subsequent post it sounds like you want to move all the objects in your choice on different layers, if that's what you want then try my code below:

var mySels = app.selection.length;
if (mySels == 0) {
    alert("Select the object and Run the script");
     exit(0)
  }
else{
while(mySels--){
          var objLayer=app.activeDocument.layers.add();
          app.selection[mySels].itemLayer = objLayer;
     }
}

Mac

Tags: InDesign

Similar Questions

  • I am trying to download the InDesign CS5.5 update and continue to be "Update failed" "please contact your administrator if you want to apply updates on your computer. I did this and now have administrator rights, but I still get the message. Ho

    I am trying to download the InDesign CS5.5 update and continue to be "Update failed" "please contact your administrator if you want to apply updates on your computer. I did this and now have administrator rights, but I still get the message. How to do the update?

    Direct updates
    -----------------

    https://www.Adobe.com/downloads/updates/

  • Cannot place and Indesign CS5 created swf save into a file, Indesign CS5?

    I hope someone can help me?  I created a SWF animated in Indesign CS5 using the amination and deadlines of the panels for use in an interactive PDF.  The SWF exported correctly and plays as expected in the browser.  However, when I go to select the swf file to place it in my Indesign file its greyed out and cannot be selected.

    I tried essentially to follow Rufus Deuchler method to integrate animations in a PDF file http://tv.adobe.com/watch/csinsider-design/indesign-creating-interactive-pdfs-with-page-tu rn - and - flash animations /. In the video's swf is available for selection when you use the command import and everything I found on the talks from web on the importation of the SWF in indesign files as a standard feature in CS5 and CS5.5.

    I tried to re export the swf file under different names and in different folders. Quit Indesign and restart; try to place the swf file in a completely different indesign file. through all the Indesign preferences to see if there is an option to "activate" swf import and I have even tried doing Rufus and export options exactly when you create the swf file.  Nothing has worked.

    Any help would be greatly appreciated.  I have screenshots and the swf file, I'm trying to import that I can email if anyone would facilitate my growing frustration.

    See you soon

    Pete

    What OS?

    Other swf files work?

    You can drag-and-drop the SWF file in InDesign?

  • Linked excel tables in InDesign CS5 update problems and keep the formatting: need help

    I've been using excel to place several tables in my InDesign CS5 document which will require the update on a regular basis. The tables are already formatted in excel, so I will place in InDesign with formatting and you will usually have to reduce proportionally the tables as soon as they are in InDesign CS5. When I'll update the links, it is important the content of the tables as part of current text with larger text and I am unable to "Insert the picture content" or "shrink content proportionally." Nobody knows how to solve this problem or know of another way to link excel with formatting tables and update without having to reformat the table (i.e. to resize the image and text) every time that happens an update? Thank you!!

    Can't do it, sorry. Tables only.

    Bob

  • Scenario: Creating layers and copy/paste

    I have a JSON data structure that import from a file, which defines a hierarchy that I need to recreate tree.
    At each point of the tree, I need to load an image and place it correctly on the screen (all data in my JSON file).

    I can write the script to create the hierarchy (using addNewLayer() and addNewSubLayer()) very well.
    I can write the script to import all the graphics very well also.

    However, if I try to combine the two by importing the graphic so as to create the layer, it fails. Trying to create the next layer for graph fails, a message "-1073741819'.»

    I was stuck on this problem for days now, and I got to this point stuck on other issues, this is my last option for what I do! (frame export of graphics for the production of Blu - ray)

    The only other option to avoid this encrypted error message would be to create the layers, then import the chart subsequently and then re - position the graphics in the correct layers...


    What would be really really useful would be to get into the conversation by e-mail or otherwise with the Fireworks javascript expert so that I could discuss other dead ends, I came to (leading back me to Photoshop for this last phase of the color reduction)

    Thank you very much

    Nathan.

    Well, it looks like what I really need, it was doc.importFile ().

    Thanks to John Dunning to host a scripts ("order Page") that has used it. It is in the documentation of FW, but I forgot of course. However, its funny (and reasuring) John was also having the same problem when using an another doc after calling doc.close ().

  • Possible bug in inDesign CS5 with find and change

    This could be a problem with my script, or it may be a bug, not sure.

    The script is used to find a double space in a text fragment and change to single space.

    It only works once when it is run.

    To make it work again you must close and reopen inDesign.

    Here is the code:

    app.findTextPreferences.findWhat = "";
    app.changeTextPreferences.changeTo = "";
    App.documents [0] .changeText ();

    Works for me...

    Try to screw up your prefs.

    Substances

  • Need help to write a script that opens files, removes layers and sous-calques

    Hey all,.

    I'm a noob to the community of script, and what I try to do is file edit commands that share the same names of layers and sublayers. I have a few questions that would be incredibly useful if I could have answered.

    I'm not sure how to define a script too call out of the layers that have been created without script. I need to create a variable for the existing layers and leave the script to know what their names are in the files?

    For example, I have three files which have each layer named 'cutlayer', 'trimlayer', 'fold' and 'work '. I need to write a script that opens three files, deletes the layer 'fold' of each file, and then move the layer "trimlayer" in his own sublayer in 'work' (the base layer can be on the top so reorganization sublayers is not necessary to worry about something). I do not understand how to write the script because I couldn't find examples in the documentation for the script provided on the adobe website which has worked with existing files.

    It's my shot at what I'm trying to do, with English fill in the blanks of what I do not know how to script. If anyone can help me understand this point, I would really appreciate it!

    app.documents.openDlg (prompt, filter, MultiSelect);  the user opens the associated files

    If (documents.length > 0) //run the script through each document individually

    {

    sourceDoc = activeDocument;

    delete the "fold" sourceDoc layer

    move the "trimlayer" in the layer "work."

    remove the underlayment 'path' of layer "work."

    Run the script through each document

    Save the new file name folder in the new parallel to the current folder on the hard disk

    Go out and spend in each document until there is no more

    }

    create new document

    Place documents published in different layers in the new document, with a distance between them, optimize the space on a 51 "x 51" work plan, using as little of the artboard as possible. "

    All comments are things basically, I do not know how and am trying to figure out how to do, so if anyone has a second to explain some of these things, I would really appreciate it!

    Thanks again!

    I know it of very frustrating when his apprenticeship and things don't go as planned, but understand that it is quite confusing as it is and do not add more confusion to the mix by using other tools than those provided. I mean JSLint, it might be useful with GENERAL javascript syntax, but Adobe's Javascript implementation is another animal, or another language, always JavaScript, but intended to be run by its own engine. JSLint has no idea what "layers", or "pathItems" are, it will trigger errors when he sees the objects, it does not recognize.

    .. .in learning... not to take baby, write a single line of code and run... If it works, write another line of code

    Try this version (always in the ESTK),'re missing you a few "++", and you do not change "documents" with "docs" in a certain place

    var docs = File.openDialog("Select Files to Open", "*.ai", true);
    
    var idx = 0;
    
    for (idx = 0; idx < docs.length; ++idx) {
    
        var doc = app.open(docs[idx]);
    
        var myCounter = 0;
    
        for (myCounter = 0; myCounter < doc.layers.length; myCounter++) {
    
            doc.layers[myCounter].locked = false;
    
        }
    
        doc.layers.getByName('Crease').remove();
    
        doc.layers.getByName('Regmark').remove();
    
        doc.layers.getByName('Artwork').pathItems[0].remove();
    
        doc.layers.getByName('Through Cut').hasSelectedArtwork = true;   
    
        doc.layers.getByName('Through Cut').pathItems[0].strokeColor = doc.swatches.getByName("Black").color;   
    
        doc.layers.getByName('Through Cut').move(doc.layers.getByName('Artwork'), ElementPlacement.INSIDE);
    
    }
    
  • need a list of links in InDesign CS5

    I need to make a list of page numbers, the name of the file and the credit of all the links in a book in InDesign CS5 - whatever ' an at - it a script that I can run for this?

    Thank you in advance.

    Hello

    You can take a look at LinkExport - Pro.jsx, written by Martin Fischer!

  • Layout InDesign CS5 EMEA

    We recently purchased Indesign CS5 EMEA version, and we seem to have put in Middle Eastern text conversion problems.

    When we use the horizontal flip, the text option is returned to a new location, rather than stay in the same place.

    (it seems that Indesing allows to reverse the text on an invisible line at the beginning of the object).indd_flip.jpg

    We used this option before with CS3 without any problems. Are there changes to this option in CS5, or y at - there a guide on how to make the PAO for the languages of the Middle East?

    Best regards

    I have absolutely no experience in ME editions so I can totally wrong, but here's what I'm 99% sure it will be...  At the top left of your screen, you should see something like this:

    Put the black dot in the middle of it and you're away!  You probably never used before, if you don't know what it is but it is quite convenient, say if you want the text box to return it.

  • InDesign CS5 do not open CS4 files

    (I work on a Mac Pro Quad - Core Intel Xeon 2.26 GHz). I've upgraded to CS5 last week and ran into a problem with InDesign does not open some files CS4. It does not at all ID CS4 files and I don't see a common factor that tells me why InDesign CS5 opens some and not others. I can always open in CS4 and they are not locked. I made sure that no one else had it open also. The error I get is the following.

    Cannot open the document "filename". You may not have permission or the document can be opened already.

    I opened the range of information in the finder and the files are not locked and permissions are appropriate. I tried to save the file to my desktop, and still save on the server and it does not want to open it in CS5. These files are shared, we have a file naming convention and storage limited review, trying to find a work around if it is not a fix for this problem.

    Any suggestion would be appreciated.

    WARNING: For a long time Mac user... I know very little except how to connect networks.

    We have implemented in order to connect to our server in the window (from our Macs) via AppleTalk and Samba. We have looked in using Samba on several occaisions, but continue to flow upward with reasons we should not / cannot use only of Samba. Sometimes, if we have a permissions problem with connecting via AppleTalk, we can connect to the same server via Samba and do not have the same permissions issues. We are also limited to files with 24 characters in the file name when write us a file on the server using AppleTalk. I have not found a limit when writing to a file on the server, when it is connected via Samba. (I tested a 100 characters in length file name and didn't see a need to go higher.)

    We have just updated our computers for CS5 to test and found the same problem with not being able to open most files from the server. We can copy the file on our hard drive, work on it, save it, then copy it to the server. But if I connect server via Samba, I can work on the file without any problems. From what I read above, I guess than that, still, has something to do with the number of characters in the file name. I'm not advising all start using Samba - less long-term. (Once again, we did some research and found several reasons we still use AppleTalk.) But it could be a temp fix for some of you, if this is possible on your networks.

    I would also add that the temporary file generated by CS4 had a tilde at the beginning of the name. The temporary files generated by CS5 have a slash and a tilde at the beginning of the name. We had not this problem in CS4 work since Windows Server at all. The slash can be the death blow.

  • I created a file in Photoshop CS5 (photo) and another in Illustrator CS5 (a graph) to place in my InDesign CS5 brochure. When Photoshop and Illustrator files are placed in InDesign, they seem blurry - read in InDesign, printed or saved as

    I created a file in Photoshop CS5 (photo) and another in Illustrator CS5 (a graph) to place in my InDesign CS5 brochure. When Photoshop and Illustrator files are placed in InDesign, they seem blurry - read in InDesign, printed or saved in PDF format. Can someone give me some advice on how to fix this? Thank you!

    View blurry in InDesign: choose View > display performance > high quality screen

    Blurry printing InDesign: Choose file > print > graphics > Images > data send: all

    Fuzzy in PDF format: fix above points first. make sure that the links are up-to-date; post a screenshot here your PDF export settings.

  • Script needed to create layers in Indesign.

    OK, this sounds simple and I'm sure that it is.

    IM currently getting all the SITE designs produced by our creative Department in Indesign (speed, ease, lack of training, whatever! etc)

    IM currently overlay of these items manually to the top which is OK, but I'm sure someone knows a script somewhere!

    Ive got a GREAT script when indesign file IS ASKED I can do a photoshop PSD that's smart of all objects etc so its perfect for web psds. Its amazing, if I can find a script that layers the Indesign document as well BEFORE THE OTHER SCRIPT EXECUTION, I can't literally nothing, and just look at the machine do the work!

    I look forward to your responses!

    Paul

    Here's the script 'objects to layers'.

  • Problem of ball when creating tables and blocks of text in InDesign CS5

    Every time I have create a new text frame or a table in InDesign CS5 and paste information, the first row in the table or several lines of text out with chips. I don't know that it's a style at some point, I created and am now unsure how to remove or setting. I would like the new blocks of text and tables do not include by default when imported or pasted chips. Any thoughts? Thank you!

    Default values for the text in the current document are made with no selected text. Disable the chips and they should stay off (but check styles, also, you have perhaps accidentally set a style bulleted as the default and you must change the default style instead). If this is the case in all files, you must do with nothing open to reset the default for all new documents (existing files, must unfortunately be set one at a time).

  • Script to recreate a link to InDesign CS5.5 needs help

    Hi, I am looking to recreate a link to images in an InDesign CS5.5 file to another server using a script. This is what I have so far, but when I run the script I get errors and the can't connect because "the file does not exist, you may not, or the file may be in use by another application". Does anyone know how to make this script work? I am fairly new to scripting.

    Here is the script that I have:

    say application "Adobe InDesign CS5.5.

    say document 1

    the value linkList to links

    set errInfo of ' ' -we display error if we cannot create a link to an element.

      -------

    Repeat with x in linkList

    if (xof the status) is not normal and then - I'm usually checking for any link that has an error

    -This should only return a path of AppleScript with ': ' separators

    the value linkPath to (xof path) as string

      -------

    if "Volumes/Calendars_2013 OPS" is in linkPath then

    the value AppleScriptto point text delimiters to "OPS Volumes/Calendars_2013.

    set linkPath of (linkPath text elements( ) - create a list of text items

    the value AppleScriptto point text delimiters of "Volumes/Calendars_2013.

    set linkPath of ( linkPath string() - concatenate with the new path

    set "Of text delimiters AppleScript point to " ' -TIDs Reset .

      -------

    try

    -Need to make our string (path) in a path of the alias

      relink x to alias linkPath

      -------

    try

    Update x -this can be useful

    end try

    on error Err

    -We will store the name of the link, if the error occurs

    the value errInfo to (errInfo & return & xof name)

    end try

    end if

    end if

    end Repeat

      -------

    -If an error occurs when trying to bind again, we post it

    if (County errInfo) > 0 then display dialog ("' cannot link again:" & errInfo")

    end say

    end say

    -Hector


    Hello

    whatever... the dictionary said...

    --> ' / Volumes/Calendars_2013 OPS/2013_Dog_Breeds/2013_A_B/9764-2_BichonPups_SQ/9764-2_imagefolder_ SQ2013/9764 - 2_01a_SQ2013.jpg.

    There is no macPath.

    So let's try the delimiters of the text you point first post and:

    relink x to posix file linkPath

    Hope this will work

  • CSharp and Indesign CS5

    Hello


    I use visual studio 2008 (c sharp) on windows 7 for createe an indesign document (CS5).

    Basically, I created an Interop.Indesign.dll through the prompt by using resources of Visual Basic.tlb IE


    TlbImp.exe "C:\ProgramData\Adobe\InDesign\Version 7.0\en_GB\Scripting Support.

    \7.0\Resources for Visual Basic.tlb"/ out: Interop. InDesign.dll

    I imported the dll resulting in my project csharp and tried code uee, but get an error message...

    Unable to cast COM type object 'System.__ComObject' interface type

    'InDesign.Application '. This operation failed because the QueryInterface on the COM call

    component for the interface with IID '{ABD4CBB2-0CFE-11D1-801D-0060B03C02E4}' failed

    due to the following error: no such interface supported (Exception from HRESULT:)

    0 X 80004002 (E_NOINTERFACE)).

    I am creafing an application in the following obj instance mann


    Type t = Type.GetTypeFromProgID ("InDesign.Application");
    Application InDesign.Application (InDesign.Application) = Activator.CreateInstance (t);


    I have refefrence the indesign dll in the project. Basically, I want to use csharp to create a

    InDesign document with images and text,

    Why is this not working any suggestions?

    Thank you

    Close visual studio, close indesign.

    InDesign opened by a right-click and select run as administrator.  Just do it once, all subsequent charges may be under the normal permission set.  This allows InDesign create the applicable type libraries.

    Now load your project, and then select Add a reference on the COM tab, it should now be a library of types of work Adobe InDesign CS5.

    Then it's as simple as:

    InDesign.ApplicationClass App = new InDesign.ApplicationClass ();

    App.DoScript (_ScriptToProcess.ToString (), InDesign.idScriptLanguage.idJavascript, new Object() {""}); sends the script to indesign for treatment (not assyncronous)

    I hope this helps.

Maybe you are looking for

  • Media buttons do not work on Qosmio X 770-h-13 using Win 8.1

    Hello I can't turn the service wireless to bar media from Toshiba on the keyboard.All the buttons (except the volume) do not seem to work.Eco = ko, Ko without thread = 3D = KB, CD is k, k = illuminated keyboard. You can enable the Windows 8.1 wireles

  • Google Chrome diverted file/share/Email this Page in Safari 9.0.1

    This is OS X El Capitan version 10.11.1 on a late 2009 iMac. The problem is that it has become impossible for Safari 9.0.1 to 'share' a Web page by emailing via Apple Mail (9.1). When 'file' / ' share ' / "send this Page" is enabled in Safari, Google

  • Front open LV from one faltering step?

    If a grave step down I want to show the façade LV then the 'Tester' can see all the orders/lights to get more info on what went wrong. new to TestStand so this can be basic stuff, but I have not found a solution. PER DAY

  • USB port do not work or reading when it is connected

    USB Mass Storage Device Properties a message arrives in the details, Device Instance ID of section «» Read the error message USB\VID_18A5 & PID_1E23\5 & 13069516 & 0 & 6

  • DX2460 network adapter does not work

    Gentlemen: It's a whole new machine, but it did not come with a driver disk, HP Compaq DX 2460. Anyone know the name of the network adapter or where I can get a driver that works? Thanks - rev