Jump to content
Welcome to InsanelyMac Forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • Allan

      Forum Rules   04/13/2018

      Hello folks! As some things are being fixed, we'll keep you updated. Per hour the Forum Rules don't have a dedicated "Tab", so here is the place that we have our Rules back. New Users Lounge > [READ] - InsanelyMac Forum Rules - The InsanelyMac Staff Team. 

Applescript Error

2 posts 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 p_up.gifp_middot.gifp_report.gif


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.