Indesign CS3: make rectangle color returns to default

I’ve got a problem that keeps coming up. Whenever I make a rectangle with a color, it ignores what I set in favor of the color swatch that happens to be selected in the GUI.

In the below, I want to make a rectangle with Cyan background, but what comes out is a box that is Pantone 355, which happens to be what’s selected in the swatch palette.


tell application "Adobe InDesign CS3"
	tell document 1
		set noneObj to object reference of first swatch whose name contains "None"
		try
			set myColor to color "C=100 M=0 Y=0 K=0"
		on error
			set myColor to make color with properties {name:"C=100 M=0 Y=0 K=0", model:process, color value:{100, 0, 0, 0}}
		end try		
		return properties of noneObj --> name:"None"
		make new rectangle at beginning with properties {bounds:{0, 0, 1, 1}, item layer:"Pre-Print", color:myColor}
	end tell
end tell

I’ve looked at changing these defaults, but I don’t think the dictionary indicates that you can set that detail in a default?

How do I get the color I’m expecting? thanx, sam

Hi

I think you need to be stating the color property as “fill color” not just “color”

tell application "Adobe InDesign CS3"
	tell document 1
		make new rectangle at beginning with properties {fill color:"C=100 M=0 Y=0 K=0"}
	end tell
end tell

Yes, that makes perfect sense. Now we’re cooking with gas! thanx, sam