2 Replies Latest reply on Dec 26, 2011 3:34 AM by myDwayneSmith

    Batch PDF script works in ID4 but not in ID5.5

    clearness

      this script worked flawlessly in ID4, but doesn't work in 5.5....It's a script that converts all open indd files to pdf.

       

      This is the error...

       

      AppleScript Error!

       

      Error Number: -2741

      Error String: Expected "," but found application constant or consideration.

       

      Engine: Default

      File: Users/AM/Library/Preferences/Adobe Indesign/Version 7.5/en_US/Scripts/Scripts Panel/PDFer.applescript

       

       

      Anyone know what's wrong with the script?

       

       

      This is the script:

       

      property convertSpotToProcess : false

       

       

       

       

      my main()

       

       

       

       

      on main()

        tell application "Adobe InDesign CS5.5"

        set alleExportFormater to name of every PDF export preset

        set alleDok to name of every document

        tell document 1

        set valgtExportFormat to (choose from list alleExportFormater with prompt "Choose PDF Setting")

        if valgtExportFormat = false then error number -128

        set targetmappe to my velgmappe()

        end tell -- doknavn

        set valgtExportFormat to PDF export preset (valgtExportFormat as text)

       

        repeat with ggg in alleDok

        set doknavn to ggg as text

       

        tell PDF export preferences

        set page range to all pages

        end tell

       

        set filnavn to doknavn

        if filnavn ends with ".indd" then set filnavn to text 1 thru -6 of filnavn

        set filnavn to filnavn & ".pdf"

        tell document doknavn

        if convertSpotToProcess then set convert to process of (every ink whose is process ink is false) to true

        set targetfil to (targetmappe & filnavn) as string

        with timeout of 40 * 60 seconds

        export format PDF type to targetfil using valgtExportFormat without showing options

        end timeout

        delay 1

        end tell

        end repeat

        say "Your PDFs are ready. "

        end tell

      end main

       

       

       

       

      on velgmappe()

        try

        tell me to activate

        end try

        return (choose folder with prompt "Choose Folder")

      end velgmappe