Applescript: missing required parameter "including hidden layers"

I've used this script (below) for packaging files in InDesign CS3, but when I upgraded to CS4 I always get this message: "Missing required parameter 'including hidden layers' for event 'package'." Does anyone know how to include this and where it goes?

Thanks.


--------
on run
display dialog "Whoa Dude, I'm a Droplet so drop an InDesign file on me"
end run

on open draggedItems
tell application "Finder"
make new folder at alias "Macintosh HD:Users:Melanie:Documents:ScriptFiles:Packaged:" with properties {name:"_Folder"}
end tell

set folderPath to "Macintosh HD:Users:Melanie:Documents:ScriptFiles:Packaged:_Folder:"
repeat with currentFile in draggedItems
tell application "Adobe InDesign CS4"
set openedfile to open (currentFile as alias)
set theDoc to (document 1)
tell document 1
package to folderPath copying fonts yes copying linked graphics yes copying profiles no updating graphics yes ignore preflight errors yes creating report yes
set fileName to (name of theDoc)
set filepath to folderPath & fileName & ".pdf"
export openedfile format "Adobe PDF" to filepath using "[Smallest File Size]"
save openedfile
close openedfile
end tell
tell application "Finder"
set NewName to fileName & "_Folder"
set name of folder folderPath to NewName
end tell
end tell
end repeat
end open
---------

MacBook Pro, Mac OS X (10.5.8)

Posted on Dec 28, 2009 11:00 AM

Reply
1 reply

Dec 28, 2009 11:30 AM in response to mdasplund

I don't use InDesign/CS4, but it seems clear that the 'package' command now has additional parameters that you're not including in the command.

Since it's telling you that 'including hidden layers' is the parameter that's missing, just append it to the packagecommand, with either a 'yes' or a 'no' depending on what you want:

package to folderPath copying fonts yes copying linked graphics yes copying profiles no updating graphics yes ignore preflight errors yes creating report yes including hidden layers no

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Applescript: missing required parameter "including hidden layers"

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.