Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: InDesign rectangle stroke won't set to 0 via AS?



Thanks so much, Peter.
I had attempted to go in this direction, but via the wrong route. Thanks for clarifying.
Works as intended now.


--
T.J. Mahaffey
email@hidden




On Jun 20, 2006, at 11:12 AM, Peter Waibel wrote:

I can't seem to get a script create an InDesign rectangle with NO stroke.
For example, this script ends up adding a 1pt stroke every time, despite my instructions.
However, if I then go in to the document and manually delete the stroke value, it'll finally go away.

If a rectangle has a stroke color then the stroke weight is greater than 0.


If you create a rectangle without specifiing a stroke color,
the stroke color is set to a swatch with the name "Black"
and your value 0 for the stroke weight is ignored.

You must set the stroke color to a swatch whose name is "None"
in order to create a rectangle with no stroke.

tell application "Adobe InDesign CS2"
tell document 1
set swatchRef to item 1 of (every swatch whose name is "None")
tell page 1
set rectRef to (make rectangle with properties {geometric bounds: {0.75, 0.75, 2.125, 3.625}, stroke color:swatchRef, stroke weight:0})
end tell
return properties of rectRef
end tell
end tell


Peter


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

This email sent to email@hidden
References: 
 >InDesign rectangle stroke won't set to 0 via AS? (From: "T.J. Mahaffey" <email@hidden>)
 >Re: InDesign rectangle stroke won't set to 0 via AS? (From: Peter Waibel <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.