• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Re script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re script


  • Subject: Re: Re script
  • From: Stan Cleveland <email@hidden>
  • Date: Thu, 04 May 2006 17:47:47 -0700
  • Thread-topic: Re script

On 5/3/06 6:26 PM, email@hidden wrote:

> I am new to this and am currently writing a script, I have done what I want
> but have one element that I cant seem to work out.
>
> It is a variable element ie it is not the same element/rectangle on every
> page, but the coordinates and also the style is the same ie the rectangle
> has a fill of white and has fixed coordinates of -1 & -.75

I'm doing a bit of reading between the lines, but it would seem you're
working with InDesign (you refer to a "rectangle") and have an element that
repeats on every page of your document. Your problem has to do with the
negative coordinates of the rectangle--I know because I've had the same
problem.

Whenever a rectangle, or other page item, falls entirely outside the page
boundary, it is no longer an element of the page. If any part of an item
touches the page it is a page element, but those that are positioned
completely on the pasteboard are spread elements. For example, below are
attempts to get coordinates of a rectangle that lies off the page.

tell application "InDesign CS"
    tell page 1 of document 1
        geometric bounds of rectangle 1
    end tell
end tell
--> Can't get geometric bounds of rectangle 1 of page 1 of document 1

tell application "InDesign CS"
    tell spread 1 of document 1
        geometric bounds of rectangle 1
    end tell
end tell
--> {-0.75, -0.5, -0.25, 1.0}

Addressing spread elements is easy with single pages. All coordinates,
negative and positive, are relative to the page coordinates. However, when
using facing pages, the "ruler origin" property plays a major role. To keep
your sanity, set it to "spread origin" (rather than "page origin") with the
following command.

    set ruler origin of view preferences of document 1 to spread origin

Then all coordinates are relative to the left-hand page and the coordinate
of the far right edge of the right-hand page is twice the page width (17
inches, if the page width is 8.5 inches).

I hope my guesses about your situation are correct. If not, then maybe this
information will help others who are scripting InDesign.

Stan Cleveland
Color Technology Inc.
Portland, Oregon


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re script (From: Sensis <email@hidden>)

  • Prev by Date: Re: IPTC Data
  • Next by Date: Re: Using perl to extract tagged text - again
  • Previous by thread: Re: Re script
  • Next by thread: A better way to get web data?
  • Index(es):
    • Date
    • Thread