InDesign Replacing Stroke Color Across Document

I am having an issue with stroke spot colors and two hours of messing with it has yet to yield results, so I again turn to you all. Hopefully you can help me out.

I’m trying to change every stroke in the document that is Paper to a spot “White” (that is actually 100% Cyan). However, whenever I run it, it makes the strokes 100% Cyan, but they’re not the spot color that they need to be. What do?


tell application "Adobe InDesign CC 2015"
	--Clear the find/change preferences.
	set find object preferences to nothing
	set change object preferences to nothing
		
	--set up new settings
	set properties of find object preferences to {stroke color:"Paper"}
	set properties of change object preferences to {stroke color:"White"}
	set myFoundItems to change object
end tell

hi

something like this may help

tell application "Adobe InDesign CC 2014"
	set myDocument to active document
	activate
	tell document 1
		try
			set _Swatch to make color with properties {name:"White", color:spot, color value:{0, 0, 0, 0}, model:spot}
			set _Colour to swatch "Paper"
			set stroke color of every item of all page items whose stroke color is _Colour to _Swatch
		end try
	end tell
end tell

Thank you, Budgie! This worked perfectly.

Not sure why creating a spot color works and calling out an already created one doesn’t, but…it works and that’s all that matters :stuck_out_tongue:

glad that works out for you

this presumes you have a spot colour called “White” in your swatches

tell application "Adobe InDesign CC 2014"
	activate
	tell document 1
		try
			set _NewSwatch to swatch "White"
			set _OldColour to swatch "Paper"
			set stroke color of every item of all page items whose stroke color is _OldColour to _NewSwatch
		end try
	end tell
end tell

Hi!
I am trying to replace a RGB swatch with a CMYK swatch. I have a BrighBlueRGB (0,110,255) that I need to be in pdfs for web and for print I have to replace it with a PrintBlueCMYK (100,80,0,0). The First color is defined as a swatch color in all Indesign files.

I tried to replace via

set PrintBlueCMYK to "100,80,0,0"
set properties of swatch  "BrightBlueRGB" to {model:process, space:CMYK, color value:PrintBlueCMYK}

but all I get is
Can’t set properties of swatch “BlueRGB” to {model:process, space:CMYK, color value:“100,57,0,0”}.

Any ideea?
thanks a lot
Dan

Hi. The problem is from passing a text, rather than a list for the color value.

tell application "Adobe InDesign CS3"'s document 1
set swatch "BrightBlueRGB"'s properties to {space:CMYK, name:"BrightBlue CMYK", color value:{100, 80, 0, 0}}
end tell

Hi!
Thanks a lot!!

I tweaked it a little, to include it in my script

tell application "Adobe InDesign 2023"
	tell active document
		set swatch "BrightBlueRGB"'s properties to {space:CMYK, name:"BrightBlue CMYK", color value:{100, 80, 0, 0}}
	end tell
end tell