How to create a tint swatch in InDesign CS2...

I’m a scripting noob and I’m trying to figure out how to do some stuff in InDesign.

Here’s what I’m trying to do: I’m creating a new process swatch “orange” and applying it as the stroke. I’d like to apply a tint of this swatch as the fill. I’m not sure what I’m doing wrong, but I’m sure that it’s when I define the “tint1” swatch.

Any help is greatly appreciated.

tell application “Adobe InDesign CS2”
activate
make new document
tell document 1 of application “Adobe InDesign CS2”
set orangecolor to make color with properties {model:process, color value:{0, 50, 100, 0}, name:“orange”}
set tint1 to make color with properties {model:process, parent:orangecolor, base color:orangecolor, tint value:“50%”, name:“50% orange”}
make polygon with properties {geometric bounds:{“0 mm”, “0 mm”, “50 mm”, “50 mm”}, inset percentage:35, number of sides:5}
set fill color of polygon 1 of page 1 to “50% orange”
set stroke color of polygon 1 of page 1 to swatch “orange”
set stroke weight of polygon 1 of page 1 to 10
end tell
end tell

Operating System: Mac OS X (10.4)

skrupa:

    set tint1 to make color with properties {model:process, parent:orangecolor, base color:orangecolor, tint value:[b]"50%"[/b], name:"50% orange"}.

I don’t have Indy installed but check your dictionary. I’ll bet it’s looking for a real or an integer, NOT a string. Try 50.0.

Good Luck,
Jim Neumann
BLUEFROG

Hmm…that didn’t change things. What is true: if you use the % after the amount of tint, quotation marks have to be used. If you don’t use a %, no quotation marks are needed. Either way, the “tint” color is showing up as black.

skrupka - Try this:

tell application "Adobe InDesign CS2"
    activate
    make new document
    tell document 1 of application "Adobe InDesign CS2"
		set orangecolor to make color with properties {model:process, color value:{0, 50, 100, 0}, name:"orange"}
		set MakePolygon to make polygon with properties {geometric bounds:{"0 mm", "0 mm", "50 mm", "50 mm"}, inset percentage:35, number of sides:5, fill color:swatch "orange", stroke color:swatch "orange", stroke tint:50, stroke weight:10}
    end tell
end tell

slimjim5811

Sweet! Thanks :slight_smile: