0 Replies Latest reply on Feb 3, 2015 4:21 AM by SirAndyMK

    Can someone help me automate exporting two different PDFs (high and low res based on presets) and name them LR or HR at the end of the file names accordingly?


      Hello. I used to have this preset running on my Mac with Automator so I could highlight an Indesign Document icon then press a key command. It would open the document then export it at 150dpi and 300dpi and change the "AW" from the end of the filename to "HR" or "LR" accordingly. It was an absolute lifesaver. Below is my previous script which doesn't seem to work any more. Any pointers as to why?


      --has to be set by user

      property myLowres : "150dpi LR"

      property myHighres : "300dpi HR"




      tell application "Adobe InDesign CC"

          set myDocs to every document

          repeat with i from 1 to count of myDocs



                  set myDoc to (item i of myDocs)

                  set filePath to file path of myDoc

                  set fileName to name of myDoc

                  set {LRFilePath, HRFilePath} to my getTargetPaths(filePath, fileName)

                  export myDoc format PDF type to LRFilePath using PDF export preset myLowres without showing options

                  export myDoc format PDF type to hrFilePath using PDF export preset myHighres without showing options

              on error e

                  display dialog e giving up after 5

              end try

          end repeat


      end tell





      on getTargetPaths(fileObject, nameString)

          set folderPath to fileObject as text

          set AppleScript's text item delimiters to {"."}

          if (count of text items of nameString) is 1 then

              set {LR, HR} to {folderPath & nameString & "_LR.pdf", folderPath & nameString & "_LR.pdf"}


              set {LR, HR} to {folderPath & (text items 1 thru -2 of nameString) & "_LR.pdf", folderPath & (text items 1 thru -2 of nameString) & "_HR.pdf"}

          end if

          return {LR, HR}

          set AppleScript's text item delimiters to {""}

      end getTargetPaths