Re: InDesign rectangle stroke won't set to 0 via AS?
Re: InDesign rectangle stroke won't set to 0 via AS?
- Subject: Re: InDesign rectangle stroke won't set to 0 via AS?
- From: Peter Waibel <email@hidden>
- Date: Tue, 20 Jun 2006 18:12:38 +0200
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:
This email sent to email@hidden