🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #18795

Creating objects won't listen to "Properties:..." [AS]

#18795
From: CouponBoy
Date: Tue, 18 Feb 2003 17:45
33 lines
2411 bytes
I am trying to work out some changes to an image placing script [Thanks Olav!!!] but am having some trouble with things I thought would be super simple:

The script makes an image box:
set myBox to make rectangle with properties {geometric bounds:{myY1, myX1, myY2, myX2}}

I'd like to specify immediately to give the box a stroke of 1 pt and make the stroke black. When I try this I get a box but no applied properties:

set myBox to make rectangle with properties {geometric bounds:{myY1, myX1, myY2, myX2},stroke weight:"1", stroke color: "Black"}

Also doing this does NOT work:
tell myPage
			set myBox to make rectangle with properties {geometric bounds:{myY1, myX1, myY2, myX2}}
			tell myBox
					set stroke weight to "1"
					set stroke color to swatch "Black"
			end tell
end tell

I get an error about the box not understanding the message to color it, with what is a double description of the color spec... "Cant set stroke color of rectangle id xx of page id xx of spread id xx of document x to swatch "Black" of rectangle id xx of page id xx of spread id xx of document x"
Why is the color spec trying to tie itself to the box? I get the same problem if I try "set stroke color to swatch "Black" of document 1"

But this does work:
tell myPage
		set myBox to make rectangle with properties {geometric bounds:{myY1, myX1, myY2, myX2}}
				tell myBox
					set stroke weight to "1"
				end tell
		end tell
set stroke color of myBox to swatch "Black" of document 1

Why do I need to set the box specs way outside of a simple tell to itself? Is there another way to set the "Properties" of the box as it is made that is completely undiscoverable?

Thanks, Chris
Technical Details
Message-ID: <1de7e876.-1@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,5f85c984a949f4e,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-02-18 10:08:07 PST
From: CouponBoy <chris.paveglio@clippermagazine.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Creating objects won't listen to "Properties:..." [AS]
Message-ID: <1de7e876.-1@WebX.la2eafNXanI>
Date: Tue, 18 Feb 2003 09:45:03 -0800
Lines: 48
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit