1 Reply Latest reply on Jun 20, 2016 3:49 PM by Loic.Aigon

    Dialog box for creating a new document

    Bullseye Print

      Hello world!


      I'm beginner with scripting, but I've read all InDesign Scripting guide tutorial because I need to do a script for a very specific duty: create layouts depending of the kind of the job will be printed, but I think that I'm pretending to do something too much complex just for 1st script.


      The idea is a script that when runned, opens a dialog box asking for the job properties (Banner Vinyl, Flag Knitted, Polyester or Trim-to-size). Depending of the selection, there must be sub-selections, i.e: Banner vinyl can be hemmed, or hem & eyelets. At the end, when all parameters are inserted, it must create a document with the job size + bleed depending of the previous data, + 3 layered boxes: 1 is cut line indication in cut layer, 2 is indications dashed line in Indications layer, and 3 is the artwork link in the Artwork layer. Additionally, I need regmarks all around the cut line (not the typical regmarks, they're 6mm black circles spreaded every 500mm all around) in the Reg layer.


      I've tried by myself,  but it's starting to be a big headache and I need a bit of help.


      Thank you!

        • 1. Re: Dialog box for creating a new document
          Loic.Aigon Adobe Community Professional

          You are right, the script is not really complicated per say. However it imbricates a lot of small chunks that can be challenging to gather for a rookie.


          Just a 2cts piece of advice. Forget UI for a bit. What you know for certain is that you will end up passing parameters to a main routine. So at this point I would focus on this routine first. Getting it to work as expected. Even using static parameters at first.

          Make yourself life easier by giving you small objectives. For example start creating a routine that will simply create a wxh document from your code. See at the docs and sdk for samples. Once that done, look at how to add boxes, deal with layers.


          Then bricks after bricks you can go deeper. Eventually when your routine is fully efficient. You can start working on the UI and at this point you will know that any errors you get is from the UI because the inner code is just functional and you know that.


          Speaking of UI, you will enjoy Peter Karhel's ScriptUI guide


          And feel free to post samples of your work so we can help better





          Ozalto | Productivity Oriented - Loïc Aigon