1 Reply Latest reply on Feb 1, 2012 12:37 AM by John Hawkinson

    No scripting experience - please help?

    JackWNichols

      Hey,

       

      I am very new to scripting, so I have little to no knowledge on how to make it work - but I have a very specific task for InDesign if anyone is able to help. (also why doesn't InDesign have 'actions' like photoshop??)

       

      So what I am trying to do is the following:

       

           - Select all objects

           - Create outlines

           - Export as .EPS

           - Close without saving

       

      I have 20 or so Ads to do each month and doing this with each one is time consuming and I know using scripts it would be much faster.

       

      On a side note if there is a way to select a folder to do this with .indd documents that would be amazing - or even with all open .indd documents.

       

      Hopefully someone will be able to help, if not - it was worth a shot at least!

       

      Thanks for any help/advice anyone can offer!

       

      -- Jack

        • 1. Re: No scripting experience - please help?
          John Hawkinson Level 5

          Actions are hard to implement. Adding them to InDesign would take a great deal of development work, and I think there are always more pressing priorities.

           

          What you ask for isn't too hard, but it's really like asking six seperate questions, which makes it more than one easily wants to bite off.

          Also, has anyone told you that outlining is a bad idea? It generally indicates a problematic workflow and it destroys hinting that is important for fonts at low point sizes.

          Anyhow...

           

          Note that you cannot create outlines for arbitrary objects. Only for some kinds of objects, mostly the text-related ones.

          Also, generally, in scripting, we do not select objects, we operate on them without selecting them.

           

          function outline(doc) {
            doc.textFrames.everyItem().createOutlines();
            doc.exportFile(ExportFormat.EPS_TYPE, new File(doc.fullName.fsName.replace(".indd","")+".eps"));
            doc.close(SaveOptions.NO);
          }
          outline(app.activeDocument);
          

           

          will outline all textframes in your document.

           

          If you want to do this on a whole folder, then it's something like:

           

          var
            folder = Folder.selectDialog("Choose a folder of INDD files"),
            files = folder.getFiles("*.indd"),
            i, doc;
          for (i=0; i<files.length; i++) {
            doc = app.open(files[i]);
            outline(doc);
          }
          

           

          Untested.