2 Replies Latest reply on Jun 22, 2015 1:04 AM by greenrookie

    How to pass a variable from Applescript to Indesign script?

    blokdijkg

      I'm using the excellent MultiPageImporter2.5-CS5.jsx script from Zanelli to import a PDF file in an Indesign document. The (Java)script starts with a popup and asks for the starting page to place the imported PDF.

       

      How can I pass a variable to this script from Applescript with the page number where to place the PDF file and continue without having to manually fill this out in the MultiPageImporter2.5-CS5.jsx popup ?

       

       

      Here's the applescript that gets the page numbers into variable thismanypages, how to pass this on to MultiPageImporter2.5-CS5.jsx in Indesign in the next step?

       

       

      tell application "Adobe InDesign CS5.5"

        tell document 1

        set thismanypages to count pages

        end tell

      end tell

       

       

      set aScriptPath to "Users:admin:Library:Preferences:Adobe InDesign:Version 7.5:en_US:Scripts:Scripts Panel:MultiPageImporter2.5-CS5.jsx"

      tell application "Adobe InDesign CS5.5"

        do script alias aScriptPath language javascript

      end tell