5 Replies Latest reply on Apr 25, 2014 5:09 PM by Wildflower123

    Automate tasks in InDesign

    Wildflower123 Level 1

      I want to create Macros that work in InDesign.

        • 1. Re: Automate tasks in InDesign
          Steve Werner Adobe Community Professional & MVP

          InDesign is most often automated with scripts, not with macros. Why don't you tell what you're trying to automate.

          • 2. Re: Automate tasks in InDesign
            Kasyan Servetsky Level 5

            You can record and play back actions with Rorohico's "Action Recorder". However it's still  beta version and not all actions you can do manually in InDesign can be recorded. I wrote a script so that the user could record an action, save it as a script and run it (a script/a set of scripts) on a number of documents.

            • 3. Re: Automate tasks in InDesign
              Doc Maik Level 4

              Kasyan Servetsky wrote:

               

              You can record and play back actions with Rorohico's "Action Recorder". However it's still  beta version and not all actions you can do manually in InDesign can be recorded. I wrote a script so that the user could record an action, save it as a script and run it (a script/a set of scripts) on a number of documents.

              That would work with anything I do? Like switching conditional text? If so, that'd be a great help for me!

              • 4. Re: Automate tasks in InDesign
                Kasyan Servetsky Level 5

                I just tested it — unfortunately, NO. It doesn't record switching conditional text. Scripting is the only option here.

                Below is example; say, I want to turn off conditional text "US Prices" and turn on "UK Prices":

                 

                Main();
                
                function Main() {
                    var doc = app.activeDocument;    
                    var conditions = doc.conditions;
                    var cond1 = conditions.itemByName("UK Prices");
                    if (cond1.isValid) cond1.visible = true;
                    var cond2 = conditions.itemByName("US Prices");
                    if (cond2.isValid) cond2.visible = false;
                }
                
                • 5. Re: Automate tasks in InDesign
                  Wildflower123 Level 1

                  Thanks for your responses, Steve and Kasayan.

                   

                  I have several combinations of objects for which I wish to use the Pathfinder > subtract command in InDesign. The process currently involves degrouping two objects (if grouped), one of which is over the other, then making a duplicate of the top object and moving it out of the way (select +alt+ +shift+ drag), then selecting the remaining original object that is still on top together with the object on the bottom, then selecting OBJECT > PATHFINDER > SUBTRACT, then moving the duplicated object back to where it was, fitting with the part of the bottom object that wasn't cut away, and regrouping the two objects. (If I don't cut away part of the bottom object, the part that is directly on the bottom has at times corrupted the top object when printed, though not on the monitor.) This process could have been made simple with an actions routine, as is done with PhotoShop.

                   

                  I appreciate your effort to write a code, Kasyan, but that's way over my head.

                   

                  By the way, with some of my objects the Pathfinder > subtract routine produced this error message: "Could not complete operation. Pathfinder result describes empty region." An Adobe tech guy was not able to solve the problem and apparently other people had the same problem as related in forums. Adoble should resolve this issue!

                   

                  --Spencer