Jump to content

Applescript Help

1 post in this topic

Recommended Posts

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


  • Create New...