0 Replies Latest reply on Jan 29, 2015 6:46 AM by SirAndyMK

    How do I export as High Res and Low Res PDFs automatically saving out with specific names? MAC

    SirAndyMK

      Hello. A while ago - before I updated and had to lose everything - I had a script supplied to me on here, basically it did the following:


      I selected an Indesign file without opening it.

      When I pressed a key command on my desktop (mac) it set off an automator action which essentially opened the file and exported it as two different PDFs and re-named them alternatively.

       

      An example would be the file "1234_WOMAN HEADER_233x600mm_01_AW.indd"

      Upon pressing the key command (I can sort the automator bit out) Indesign would open it, then save it out as two PDFs based on two of my presets. One would be called "1234_WOMAN HEADER_233x600mm_01_HR.indd" and would be produced according to my "High Res" settings and the other would be called "1234_WOMAN HEADER_233x600mm_01_LR.indd" produced by my "Low Res" settings.

       

      Basically this stops me having to open every file, going down the file menu to export as High Res, etc then changing the file name, etc. THEN having to do it all again for a Low Res version. I could produce two different res versions which were appropriately named at the press of a button.


      Can anyone help me on this? Last time some hero stepped up and made the world a better place for me!

       

      I'm running Indesign CC 9.1 if that helps.


      Regards


      Andy

       

      UPDATE!!!

      I FOUND THIS IN MY SCRIPTS SINCE THE UPDATE SO I MUST BE PRETTY MUCH THERE. I GET A MESSAGE SAYING

      Error -2700

      Error String: This script contains uncompiled changes and cannot be run/


      Engine: Default

      File: (leads to my scpt file).


      WHEN I TRY TO RUN THE SCRIPT IN THE EDITOR I GET:
      Syntax Error

      Expected "end" or "end tell" but found unknown token.

       

      BELOW IS THE ACTUAL SCRIPT:

      --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

              try

                

                  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"}

          else

              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