babs68 Posted June 5, 2008 Share Posted June 5, 2008 Hi, I'm very new to scripting but am trying to learn by creating some scripts I could use. I found this script that would be useful in creating slugs (file/project information for a particular project) in InDesign. Unfortunately, when I try to run it, I get this error message: "Adobe InDesign CS2 got an error: Can't set contents of every page item whose label = "slug logo title" to "Company Name, Proof, etc"." If someone could help advise me where I'm going wrong I would greatly appreciate it. Here is the applescript I have created: tell application "Adobe InDesign CS2" set myDocument to active document set mySlugText to "Company Name, Proof, etc" --Doc Bleed & Slug area setup set thisDocHeight to page height of document preferences set slugHeight to 5.25 --all measurements in picas set thisDocBBleed to (document bleed bottom offset of document preferences) set thisDocBSlug to thisDocBBleed + slugHeight set slug bottom offset of document preferences to thisDocBSlug --Text box for the book title & ISBN set slugTitleHeight to 1.25 --pi set slugTitleWidth to 25 --pi set slugXTitleOffset to 1.25 --pi set slugYTitleOffset to 1 --pi set mySlugTitleBounds to {thisDocHeight + thisDocBBleed + slugYTitleOffset, slugXTitleOffset, thisDocHeight + thisDocBBleed + slugYTitleOffset + slugTitleHeight, slugXTitleOffset + slugTitleWidth} tell every page of myDocument set titleRect to make new text frame with properties {stroke color:swatch "None" of myDocument, geometric bounds:mySlugTitleBounds, label:"slug logo title", fill color:swatch "Paper" of myDocument} end tell set contents of every page item whose label = "slug logo title" to mySlugText end tell Link to comment Share on other sites More sharing options...
claidheamdanns Posted January 19, 2010 Share Posted January 19, 2010 I've seen this exact same script posted for CS3, and presumably would work in CS4 as well. But I also get the same error when trying to run it. Link to comment Share on other sites More sharing options...
Recommended Posts