Trying to batch print to postscript and getting AppleScript Error!

Here is the script as copied from Script Editor:
-- make a variable for the print settings to use:
set thPrintSettings to "Publishers PDF standard"
global thPrintSettings
-- initially, we'll allow for picking destinations at script start
set targetFolder to choose folder with prompt "Location for PDF files..."
global targetFolder
set varBasename to "CTB"
tell application "Adobe InDesign CS3"
-- Environment test: We want 1 book, no documents open:
try
get document 1
display dialog "Please run this script without any documents open (except one Book)" buttons "OK" default button 1
return
on error
-- we must be good to go, no documents open
end try
try
set thBook to book 1
on error
display dialog "Please open an InDesign Book to use this script" buttons "OK" default button 1
end try
if modified of thBook then
display dialog "This Book has been modified. Do you want to continue running the script?" buttons {"Cancel", "Yes"} default button 1
end if
tell thBook
set countOfThBook to (count of book contents)
set thContentsList to (full name of book contents) as list
end tell
-- return {countOfThBook, thContentsList}
set user interaction level of script preferences to never interact -- avoid any dialogs (for printing or saving)
set n to 0
repeat with j from 1 to countOfThBook -- loop through book's documents
set thDoc to item j of thContentsList
open thDoc
tell active document
repeat with c from 1 to (count of every ink)
tell ink c
set convert to process to true
end tell
end repeat
set myName to varBasename
repeat with i from 1 to count of pages -- loop through book's pages
set y to name of page i
set n to n + 1
tell print preferences
set page range to y --page range sets which page(s) to print
set active printer preset to thPrintSettings
set print file to alias ("" & targetFolder & myName & "_" & n & ".ps")
end tell
print --without print dialog
end repeat
close saving no
end tell
end repeat
end tell
Every time I try to run it I get the following error:
AppleScript Error
Adobe InDesign CS3 got an error: Invalid parameter.
Help!!!

On 2/12/08 1:52 AM, "Jaime C. Starkey" <[email protected]> wrote:<br /><br />> I replaced the "set active printer preset" line to "set thPrintSettings to<br />> printer preset "CTB"<br /><br />No -- you should leave the "set active printer preset to thPrintSettings"<br />line as it was. The line you need to change is "set thPrintSettings to<br />"Publishers PDF standard"" -- that's where you need to insert "printer<br />preset".<br /><br />-- <br />Shane Stanley <[email protected]><br />AppleScript Pro Florida, April 2009 <a href=http://scriptingmatters.com/aspro>

Similar Messages

  • TS3694 1015 ? I'm trying to update my iPhone 3 and get this error message. The phone belonged to my wife, and I'm trying to restore it to factory settings as new owner. Any ideas?

    1015 ? I'm trying to update my iPhone 3 and get this error message. The phone belonged to my wife, and I'm trying to restore it to factory settings as new owner. Any ideas?

    Before beginning the download, try temporarily disabling your antivirus, anti-adware, anti-spyware, and any other anti-whatever that is required with the secure OS your computer is running.

  • I tried to reinstall iCal from Disk and get an error

    I deleted info.plist from my iCal package. I had read somewhere that if I deleted that all old files in my iCal would be deleted. But instead what happened is I get an error when I try to start "2008-05-19 15:29:46.693 iCal[9051:10b] No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting logout" So then I tried to reinstall iCal from Disk and get the error "The Installer could not validate the contents of the 'iCal' package. Contact the software manufacturer for assistance"

    lizesc,
    Welcome back to Apple Discussions.
    I deleted info.plist from my iCal package.
    Just for the edification of other users, you should never alter any files inside of an application package.
    Drag your current copy of iCal to the trash, and then follow these steps to reinstall iCal:
    1. Insert your Leopard Installation disk into the computer.
    2. The disk will appear on your desktop.
    3. Double click on the "Optional Installs" folder.
    4. Double click on the "Optional Installs.mpkg."
    5. Click on (Continue) in Introduction.
    6. Click on (Continue) in Software License Agreement.
    7. Click on (Agree) to agree to the terms of the software license agreement.
    8. Click on the disclosure arrow ▶ next to Applications.
    9. Select (✓) iCal.
    10. Click (Continue).
    11. After iCal has been reinstalled, download and install the OS X 10.5.2 Combo Update.
    ;~)

  • I am trying to buy more iCloud memory and get an error message

    I am trying to buy more iCloud memory and get an error message

    What does the error message say?
     Cheers, Tom

  • HT4623 I am trying to update my iphone 4s and get an error message not connected to internet

    I am trying to update my iphone 4S and get an error message that I am not connected to the internet

    Okay, so connect.
    Either via Wi-Fi or enable Cellular Data in settings.

  • HT201209 I have itunes vouchers and each time i click redeem , I get error "we could not complete your itunes store request,  an unknown error occured 1202, try again later. I have tried this for 4 days running and get same error.

    have itunes vouchers and each time i click redeem , I get error "we could not complete your itunes store request,  an unknown error occured 1202, try again later. I have tried this for 4 days running and get same error.

    I have this same problem. It's like it is not Authorizing this Mac.
    What happens when you try to listen to a preview on the Music Store?
    Mine asks me to authorize again and gives me the error exactly as you said above.
    What happens when you try to view your account information (in Music Store, click on your account name in the top right corner)?
    Mine lets me authorize sucessfully and shows me my account information.
    I have emailed iTunes support about this and they replied with a generic answer about Deauthorizing and re-authorizing the computer.
    I even tried, to no avail, the tips here...
    http://discussions.apple.com/thread.jspa?threadID=471237&tstart=30
    If anybody reads all this and has any new info for us, please take the time to post it here!
    PowerMac G4   Mac OS X (10.4.6)  

  • Trying to update my billing info and get an error 413.  Howabout a phone number and a real person and forget the foolish online crap? n

    Tried to change my billing info and got an error message 413. 
    How about supplying a phone number and a real person instead of the inpersonal online activity that apparently does not work.

    Hello Dennis,
    please give us feedback, whether you had been successful. If not, maybe we can interest a qualified and educated employee of Adobe's staff.
    Nevertheless I normally I would use Contact Customer Care = http://helpx.adobe.com/contact.html, by clicking through the headlines.
    If none of the conditions is fulfilled, and if "open" please use chat, I had the best experiences. I quote from Preran: The chat button is activated as soon as there is an agent available to help.
    Good luck!
    Hans-Günter

  • Trying to upgrade to FireFox 4 and getting this error: The operation can't be completed because the item "libsoftokn3.dylib" is in use.

    I am using a new MacBook Pro. I click on the "Download FireFox 4.0" button. The file(s) download and the dialog appears to drag FireFox icon into the Applications folder.
    I get a dialog that says "There is a previous version.. Ok to replace?" I click "Replace".
    Then I get a Copy dialog that says: "The operation can’t be completed because the item “libsoftokn3.dylib” is in use."
    The software is not updated and I am still on FireFox 3. I tried rebooting and doing it again - I get the same results. I also did a web search and was not able to find a solution to this error.

    I had success by:
    1- Quit Firefox
    2- Go to the Applications folder and drag Firefox to the desktop
    3- Install Firefox 5 (it installs successfully at this point)
    4- Put old Firefox in the trash
    5- Secure empty trash
    It may be possible to just drag Firefox directly to the trash and use regular Empty Trash, but I did not try that. Some people on the net reported that they could not empty the trash after putting the old Firefox in the trash (got the same "libsoftokn3.dylib is in use" error), so I just tried Secure Empty Trash, which may be no different from a regular empty trash as far as this goes; not sure as I'm a bit new to the Mac.

  • I am trying to use apache commons fileupload and get this error

    I am using tomcat 5.5 as application server and JDK 1.6,
    does anybody have idea how to resolve this error ?
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    java.security.AccessControlException: access denied (java.util.PropertyPermission java.io.tmpdir read)
         java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
         java.security.AccessController.checkPermission(AccessController.java:546)
         java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
         java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1285)
         java.lang.System.getProperty(System.java:652)
         org.apache.commons.fileupload.disk.DiskFileItem.getTempFile(DiskFileItem.java:611)
         org.apache.commons.fileupload.disk.DiskFileItem.getOutputStream(DiskFileItem.java:556)
         org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:362)
         org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:126)
         project.UploadFiles.processRequest(UploadFiles.java:48)
         project.UploadFiles.doPost(UploadFiles.java:107)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:597)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)

    Make sure that the servlet has permissions to write to that directory. I've hit that snag before, and on linux I set the permissions to nobody nobody 775.
    Good luck,
    Krista

  • Installing Adobe Extension Manager and get the error message

    I am trying to install Adobe Extension Manager and get the error message ' Requires Photoshop 32 version in range of inclusively 13.0 and 13.9'  Please help me solve this, not sure how to proceede after getting a message that there is four updates available to download !

    Type <b> about:addons </b> in URL
    *plugins and extension -> disable adobe reader

  • I am trying to open my iTunes on a Windows XP laptop and get the error message 42404 "iTunes application could not be opened.  Please repair or reinstall QuickTime".  I did that and it did not help.  Any ideas?

    I am trying to open my iTunes on a Windows XP laptop and get the error message 42404 "iTunes application could not be opened.  Please repair or reinstall QuickTime".  I did that and it did not help.  Any ideas?

    Let's see if a more rigorous uninstall/reinstall procedure gets us past that, nancy. See the following troubleshooting document:
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP

  • I have two versions of Pr, one is the latest 2014 and when trying to open a Pr2014 session, I get an error message saying the project was saved in a newer version and cannot be opened. Help

    I have two versions of Pr, one is the latest 2014 and when trying to open a Pr2014 session, I get an error message saying the project was saved in a newer version and cannot be opened. Could there be an issue with an older Pr application on the computer? Please help!

    You need to be very careful which project you open in which version.
    For 2014 make sure its on 2014.1 build 81.

  • Trying to update my ipod but i get the error message network timed out.  I've already uninstalled and reinstalled the latest version of itunes. I also do not have software update in settings on the ipod. How do i get the ipod to update?

    trying to update my ipod but i get the error message network timed out.  I've already uninstalled and reinstalled the latest version of itunes. I also do not have software update in settings on the ipod. How do i get the ipod to update?

    Try the manual method specified here:
    iDevice Troubleshooting 101 :: iPhone, iPad, iPod touch

  • My Ipod is stuck in recovery mode with the plug in to itunes thing on the screen I tryed to restore it but I keep getting a error 28 and I tryed to do the reset thing but it did not work what do I do?

    My Ipod is stuck in recovery mode with the plug in to itunes thing on the screen I tryed to restore it but I keep getting a error 28 and I tryed to do the reset thing but it did not work what do I do?

    Hi,
    You could see if this helps...
    DFU Mode / Unable to Update or Restore
    http://support.apple.com/kb/HT1808
    DFU Mode
    Open iTunes and Connect the iPod to your Mac
    Press and Hold the Sleep/Wake Button and the Home Button at the Same Time
    After 10 Seconds release the Sleep/Wake Button until iTunes tells you it has Detected an iPod in Recovery Mode...
    The Phone Screen will remain Black... Now Restore.
    Backing up, Updating and Restoring
    http://support.apple.com/kb/HT1414

  • I am trying to upgrade to iTunes 11.4 and get an error message that says " iTunes has an invalid signature.  It will not be installed"  How do I fix that?

    I am trying to upgrade to iTunes 11.4 on my Windows7 PC and get an error message that says " iTunes has an invalid signature.  It will not be installed"  How do I fix that?

    Hi curliejo, 
    Welcome to the Apple Support Communities!
    In your situation I would recommend the steps in the following article for troubleshooting iTunes. It may be necessary to completely remove and reinstall iTunes in this situation. Be sure to remove all of the components with iTunes in the correct order as outlined in the article before installing fresh. 
    Issues installing iTunes or QuickTime for Windows
    Have a great day, 
    Joe

Maybe you are looking for